cupyx.profiler.profile#
- cupyx.profiler.profile()[source]#
Enable CUDA profiling during with statement.
This function enables profiling on entering a with statement, and disables profiling on leaving the statement.
>>> with cupyx.profiler.profile(): ... # do something you want to measure ... pass
Note
When starting
nvproffrom the command line, manually setting--profile-from-start offmay be required for the desired behavior. Likewise, when usingnsys profilesetting-c cudaProfilerApimay be required.