I’m trying to debug/optimize my code but am running into a problem on the Jetson X1.
When running “cuda-memcheck thingtodebug”, the available memory is drastically reduced.
device_props.totalGlobalMem returns 3982 MB normally, but only 995 MB with cuda-memcheck.
I’m fairly new to CUDA, so this might be pretty obvious?
I’ve done the following:
- Recompiled the kernel with swap enabled, and moved everything to an SSD to give it swap space
- Wrapped my code of interest with cudaProfilerStart() / cudaProfilerStop()
- Disabled X11 and killed unneeded processes (this is why I have 3982 MB available normally).
$ free total used free shared buff/cache available Mem: 4078456 175060 3433532 1920 469864 3844104 Swap: 16777212 38940 16738272