I want to check the free memory on the device while executing a CUDA kernel. cuMemGetInfo(&free, &total) is a host (CPU) based command which gives free memory on the Device.

But is there any way to check free memory inside a CUDA kernel code during execution ?

有帮助吗?

解决方案

Use profiler - The NVIDIA Visual Profiler is a cross-platform performance profiling tool that delivers developers vital feedback for optimizing CUDA C/C++ applications.

First introduced in 2008, Visual Profiler supports all 350 million+ CUDA capable NVIDIA GPUs shipped since 2006 on Linux, Mac OS X, and Windows.

The NVIDIA Visual Profiler is available as part of the CUDA Toolkit.

See User's Guide Here

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top