PyTorch CUDA:提供的PTX是用不支持的工具链编译的



我使用的是Nvidia V100,规格如下:

(pytorch) [s.1915438@cl1 aneurysm]$ srun nvidia-smi
Sun Jul 17 16:17:27 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.29.05    Driver Version: 495.29.05    CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla V100-PCIE...  On   | 00000000:D8:00.0 Off |                    0 |
| N/A   31C    P0    25W / 250W |      0MiB / 16160MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
         
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Python, Pytorch和CUDA版本如下:

Python 3.8.13 (default, Mar 28 2022, 11:38:47) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.12.0+cu113'

当我运行一个包含机器学习模型的python文件时,我得到以下错误:

(pytorch) [s.1915438@cl1 aneurysm]$ srun python aneurysm.py
terminate called after throwing an instance of 'std::runtime_error'
what():  the provided PTX was compiled with an unsupported toolchain.
srun: error: ccs2114: task 0: Aborted

是兼容性问题吗?我应该退回到CUDA 10吗.2因为V100是非常老的GPU?

任何使用HPC集群的旧GPU的人都可能不走运。就我而言,我用的是Nvidia Driver 495,它不是很老。事实上,对于CUDA 11.5,他们推荐使用Nvidia Driver 470。

这是Nvidia对类似问题的官方回复。他们还建议更新驱动程序。大多数情况下,高性能计算中心不会根据个人要求更新驱动程序。

您可以按照cuda-compatibility文档中的描述使用cuda-compat包

  1. 从cuda repo下载最新的cuda-compat包
  2. 安装或解压
  3. 在运行代码前导入

export LD_LIBRARY_PATH=/path/to/cuda/compat/so/files:$LD_LIBRARY_PATH

4
  • 神奇~
  • 顺便说一句:nvidia仅为商业利益的数据中心系列启用此功能,但从技术上讲,nvidia可以将此功能带到所有设备上。

    最新更新