Cuda runtime calls that require a context implicitly create one if it doesn’t already exist.
I was wondering if pinned memory allocation functions, cudaMallocHost and cudaHostAlloc do this implicit context creation or not. I’m looking to create portable pinned memory if that makes a difference.
Also, if they do create a context, does that mean that I need to free the memory before the context dies or not? What happens if I don’t?
It’s an issue with correctly working with a multi threaded program.