【问题标题】:How to check the version of NCCL如何查看NCCL的版本
【发布时间】:2021-07-03 04:35:34
【问题描述】:

我正在远程访问高性能计算节点。我不确定 NVIDIA Collective Communications Library (NCCL) 是否安装在我的目录中?有没有办法检查NCCL

【问题讨论】:

  • 你试过nvcc --version吗?
  • 你可以用 pytorch 做python -c "import torch;print(torch.cuda.nccl.version())"。我希望我在没有 pytorch 的情况下新建终端命令。

标签: python tensorflow nvidia horovod


【解决方案1】:

如果你使用 PyTorch,你可以试试 locate nccl| grep "libnccl.so" | tail -n1 | sed -r 's/^.*\.so\.//'torch.cuda.nccl.version()

查看此链接Command Cheatsheet: Checking Versions of Installed Software / Libraries / Tools for Deep Learning on Ubuntu

对于有时没有locate 可用的容器,可以将其替换为ldconfig -vldconfig -v | grep "libnccl.so" | tail -n1 | sed -r 's/^.*\.so\.//'

【讨论】:

  • 非常感谢您的回答。实际上在您提到的链接中,一些命令是有效的,但是对于某些安装它会给出这个错误:-bash: /bin/sudo: Permission denied
  • 当我输入`locate nccl| grep "libnccl.so" |尾-n1 | sed -r 's/^.*\.so\.//'1,什么都不显示。
【解决方案2】:

您通常可以在命令行中执行此操作:

nvcc --version

你可能不得不跑:

sudo apt install nvidia-cuda-toolkit

也是。


正如其他回答者所说,您可以这样做:

torch.cuda.nccl.version()

在 pytorch 中。复制粘贴到你的终端:

python -c "import torch;print(torch.cuda.nccl.version())"

我确信在 tensorflow 中有类似的东西。

【讨论】:

  • NVCC 是一个通用的 CUDA C++ 编译器。它不报告 NCCL(通信库)版本。答案的第一部分是错误的。
猜你喜欢
  • 2020-07-19
  • 2014-02-18
  • 2013-06-25
  • 2018-08-27
  • 1970-01-01
  • 1970-01-01
  • 2011-03-21
  • 2020-10-25
  • 2011-04-18
相关资源
最近更新 更多