我正在尝试在 Colab 上使用 ncu,但是当我输入
ncu
/bin/bash: ncu: command not found
几天前这个命令运行良好,我不确定是我在代码中犯了一些错误还是 colab 的问题。
我无法安装 Nsight,因为如果我运行这个:
!chmod +x /content/drive/MyDrive/ncu/nsight-compute-Linux-2023.1.0.16-32451174.run
!/content/drive/MyDrive/ncu/nsight-compute-Linux-2023.1.0.16-32451174.run --confirm
它显示在许可证之后它出现了这个错误
The program './install-Linux.pl' returned an error code (1)
因为这个错误我不能使用 nvprof(新架构不再支持 nvprof)
======== Warning: Skipping profiling on device 0 since profiling is not supported on devices with compute capability 7.5 and higher.
Use NVIDIA Nsight Compute for GPU profiling and NVIDIA Nsight Systems for GPU tracing and CPU sampling.
Refer https://developer.nvidia.com/tools-overview for more details.
以下是在 Google Colab 上安装 CUDA Toolkit 12.1 的说明,其中包括 Nsight Compute:
! set -x \
&& cd $(mktemp -d) \
&& wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run \
&& sudo sh cuda_12.1.0_530.30.02_linux.run --silent --toolkit \
&& rm cuda_12.1.0_530.30.02_linux.run
PATH
import os
os.environ['PATH'] = os.environ['PATH'] + ':/usr/local/cuda/bin/'
! ncu --version
随意克隆我现有的 Google Colab 笔记本在这里!