Skip to content
Yui Chun Leung (Leo) edited this page Apr 30, 2023 · 7 revisions

Solution

  1. Install Nsight Compute.
    • Version: 2021.2.1 -> Download .run file -> chmod +x -> ./xxx.run
    • sudo echo options nvidia "NVreg_RestrictProfilingToAdminUsers=0" >> /etc/modprobe.d/nvidia.conf.
    • sudo reboot
  2. Generate binaries for code you want to analyse.
    nvcc -G -o nodiv.out ../src/aj_warp_divergence_extra/nodiv.cu
    nvcc -G -o div.out ../src/aj_warp_divergence_extra/div.cu
    
  3. Generate reports. (view [4] 6.3 Section to translate metrics from nvprof to ncu)
    /NVIDIA-Nsight-Compute-2021.2/ncu -o profile_test_div -f -k "divergence_code" --target-processes all --section "WarpStateStats" --section "SourceCounters" --launch-count 1 ./div.out
    /NVIDIA-Nsight-Compute-2021.2/ncu -o profile_test_nodiv -f -k "no_divergence_code" --target-processes all --section "WarpStateStats" --section "SourceCounters" --launch-count 1 ./nodiv.out
    
  4. View reports through UI.
    /NVIDIA-Nsight-Compute-2021.2/ncu-ui
    
    • Import reports. (File -> Open File -> .ncu-rep) image

References

  1. Profiling GPU code with NSIGHT systems
  2. NVIDIA Development Tools Solutions - ERR_NVGPUCTRPERM: Permission issue with Performance Counters
  3. Using Nsight Compute and Nsight Systems
  4. Nsight Compute CLI
Clone this wiki locally