Search code examples
cudanvprof

How to profile the CUDA application for a short amount of time by nvprof?


I wanna to generate a limit profile by nvprof. how to restrict profiling time to just 5 seconds?


Solution

  • nvprof has a timeout option. From the documentation :

    A timeout (in seconds) can be provided to nvprof. The CUDA application being profiled will be killed by nvprof after the timeout. Profiling result collected before the timeout will be shown.

    Note: Timeout starts counting from the moment the CUDA driver is initialized. If the application doesn't call any CUDA APIs, timeout won't be triggered.