Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why do cv::cuda::Stream need GPU memory?

I was looking into an issue regarding cv::cuda::Stream reported here. Some GPU memory is allocated via DefaultDeviceInitializer when Stream::Null() is called, and since the DefaultDeviceInitializer object is globally defined, the GPU memory deallocator code may be executed after CUDA context is destroyed.

The question is : why do OpenCV implements Stream objects with close relation to GPU memory? IMHO, isn't it rather common for some GPU allocated objects to be handled by different CUDA streams? If so, what is the advantage of this kind of implementation?

Why do cv::cuda::Stream need GPU memory?

I was looking into an issue regarding cv::cuda::Stream reported here. Some GPU memory is allocated via DefaultDeviceInitializer when Stream::Null() is called, and since the DefaultDeviceInitializer object is globally defined, the GPU memory deallocator code may be executed after CUDA context is destroyed.

The question is : why do OpenCV implements Stream objects with close relation to GPU memory? IMHO, isn't it rather common for some GPU allocated objects Where does OpenCV expect programmers to be handled by different CUDA streams? If so, what is the advantage of use this kind of implementation?memory for?

Why do cv::cuda::Stream need GPU memory?

I was looking into an issue regarding cv::cuda::Stream reported here. Some GPU memory is allocated via DefaultDeviceInitializer when Stream::Null() is called, and since the DefaultDeviceInitializer object is globally defined, the GPU memory deallocator code may be executed after CUDA context is destroyed..

The question is : Attempting to solve this issue, I've found out that cv::cuda::Stream::Impl has Ptr<GpuMat::Allocator> allocator as its member and the issue was related to unallocating GPU memory allocated by this allocator object.

But why do OpenCV implements Stream objects with close relation to need a GPU memory? Where does memory allocator? IMHO there seems no other usage of this allocator in current OpenCV expect programmers to use this memory for?source tree.

Why do cv::cuda::Stream need GPU memory?

I was looking into an issue regarding cv::cuda::Stream reported here.

Attempting to solve this issue, I've found out that cv::cuda::Stream::Impl has Ptr<GpuMat::Allocator> allocator as its member and the issue was related to unallocating GPU memory allocated by this allocator object.

But why do Stream objects need a GPU memory allocator? IMHO there seems no other usage of this allocator in current OpenCV source tree.allocator?