TX2 gpu mem limit

I’m doing feature extraction for image with 640x480 size by OpenCV cuda on TX2.
It takes ~600M mem once I init gpu usage with code:

cv::Mat cpu_img = cv::Mat::zeros(640, 480, cv::8UC1);
cv::cuda::GpuMat gpu_img;
gpu_img.upload(cpu_img);

Besides, two thread gpu programs metioned above take ~600M X 2 memory resource.
I don’t think this task need so much mem resource.
So, my question is:

  1. How can I set gpu mem usage to a proper value which just enough for the task ?
  2. Can multi gpu thread share the same memory?
    Thank you!

Hi,
The may be specific to using CUDA filters in OpenCV. We would suggest go to OpenCV forum for further help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.