The profiler might be started and stopped via torch.cuda.cudart().cudaProfilerStart() and torch.cuda.cudart().cudaProfilerStop(), repectively, in side the code or it can also profile the complete script. Once the script finishes, nvprof will create the profiling output. If you are profiling the complete script (for 93+ epochs), the output would be large and might take some time of course.