Do CUDA 3D memory copy parameters need to be kept alive?

76 Views Asked by At

Consider the CUDA API function

CUresult cuMemcpy3DAsync (const CUDA_MEMCPY3D* pCopy, CUstream hStream);

described here.

It takes a CUDA_MEMCPY3D structure by pointer ; and this pointer is not to some CUDA-driver-created entity - it's to a structure the user has created.

My question: Do we need to keep the pointed-to structure alive past the call to this function returning? e.g. until after we've sycnrhonized the stream we've enqueued the copy on? Or - can we just discard it immediately? I'm guessing it should be the former, but the documentation doesn't really say.

0

There are 0 best solutions below