Ask Your Question

chpatrick's profile - activity

2017-08-18 07:40:11 -0600 received badge  Student (source)
2016-09-08 08:22:05 -0600 commented question cuda::GpuMat using too much memory

I built it specifically for my architecture (Pascal).

2016-09-07 21:03:01 -0600 asked a question cuda::GpuMat using too much memory

I'm using cudafeatures2d to do ORB feature matching. I want to upload all of the descriptor sets that I want to match against, but I'm finding that for some reason each GpuMat takes up 16x as much GPU memory as it should.

For example, if I upload a descriptor Mat of 20107x32 bytes (should be 628.3 KiB), I can see in nvidia-smi that my process's memory usage increases by 10 MiB. This goes on until my total process GPU memory use reaches about 2 GiB, when it crashes with the following exception:

opencv-3.1.0/modules/core/src/cuda/gpu_mat.cu:71: error: (-217) out of memory in function allocate

This is also weird because my GPU has 6 GB of RAM, not 2.

Any idea what's going on?