解决 Unknown compute capability.Specify the target compute capabilities in the TCNN_CUDA_ARCHITECTURES

问题描述

安装torch-cuda-nn时出现的问题:pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-p6crjgm4/bindings/torch/setup.py", line 49, in <module>
          raise EnvironmentError("Unknown compute capability. Specify the target compute capabilities in the TCNN_CUDA_ARCHITECTURES environment variable or install PyTorch with the CUDA backend to detect it automatically.")
      OSError: Unknown compute capability. Specify the target compute capabilities in the TCNN_CUDA_ARCHITECTURES environment variable or install PyTorch with the CUDA backend to detect it automatically.      No ROCm runtime is found, using ROCM_HOME='/opt/rocm-5.4.3'
      No CUDA runtime is found, using CUDA_HOME='/sw/spack/delta-2022-03/apps/cuda/11.6.1-gcc-11.2.0-vglutoe'
      Building PyTorch extension for tiny-cuda-nn version 1.7
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

解决方案:

https://developer.nvidia.com/cuda-gpus查询GPU的计算能力,把数字乘以10。例如,如果你用的是A40,在命令行里输入export TCNN_CUDA_ARCHITECTURES=86即可

export TCNN_CUDA_ARCHITECTURES=xx

在这里插入图片描述

成功!

(NL) [tcheng1@dt-login01 ~]$ pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
  Cloning https://github.com/NVlabs/tiny-cuda-nn/ to /tmp/pip-req-build-bcp2g11x
  Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ /tmp/pip-req-build-bcp2g11x
  Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 1ee07877239b46fbdafeb8ae155a786a84a37e18
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: tinycudann
  Building wheel for tinycudann (setup.py) ... done
  Created wheel for tinycudann: filename=tinycudann-1.7-cp39-cp39-linux_x86_64.whl size=27015227 sha256=b62175b54488010dc043a8c06f8ee2d5c56c30cd49e8296820c49ba71e62d3d6
  Stored in directory: /tmp/pip-ephem-wheel-cache-jb_efshb/wheels/a9/17/8d/33c2914dcfb0b2fb1476d5d89ba4d3c896e5125178bdaeff3b
Successfully built tinycudann
Installing collected packages: tinycudann
Successfully installed tinycudann-1.7
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
### 回答1: 这句话的意思是:当前安装的PyTorch版本不支持具有CUDA能力的sm_86的NVIDIA GeForce RTX 3090。该PyTorch版本只支持sm_37、sm_50、sm_60、sm_61、sm_70、sm_75和compute_37的CUDA能力。 ### 回答2: 这句话的意思是,nvidia geforce rtx 3090的CUDA计算能力为sm_86,而当前安装的pytorch只支持计算能力为sm_37、sm_50、sm_60、sm_61、sm_70和sm_75,以及compute_37。因此,当前的pytorch安装不支持nvidia geforce rtx 3090这样的显卡。 要解决这个问题,我们需要升级pytorch安装程序以支持sm_86计算能力。这可以通过更新pytorch安装程序或使用更高版本的pytorch来实现。同时,我们还需要确保GPU驱动程序和CUDA工具包版本与pytorch要求的版本匹配,这是保证兼容性的必要条件。 此外,需要注意的是,nvidia geforce rtx 3090是面向高端用户的显卡,其计算能力比较高,适合进行复杂的机器学习和深度学习任务。因此,如果需要使用这款显卡进行计算任务,建议再研究一下相关文献,以确保计算效率和性能的最大化。 ### 回答3: NVIDIA的GeForce RTX 3090显卡采用了最新的CUDA架构SM_86,但是据错误提示所述,当前安装的PyTorch不支持SM_86的CUDA能力。当前版本只支持CUDA能力为SM_37、SM_50、SM_60、SM_61、SM_70、SM_75以及compute_37的显卡。 这意味着,如果您想在使用GeForce RTX 3090的同时使用PyTorch,您需要更新PyTorch的安装版本以支持新的CUDA架构。或者,您可以降级GeForce RTX 3090的CUDA版本以与当前的PyTorch版本兼容。 更新PyTorch的方法如下: 1. 确认您的显卡支持SM_86架构。 2. 下载并安装支持SM_86架构的CUDA版本。 3. 更新PyTorch版本以支持新的CUDA版本。 降级GeForce RTX 3090的CUDA架构的方法如下: 1. 确认您当前的PyTorch版本支持您想要降级的CUDA架构。 2. 下载并安装符合您要求的CUDA版本。 3. 更新GeForce RTX 3090的驱动程序以支持新的CUDA架构。 总的来说,更新或降级系统中的组件的方法相对较为简单,但需要您仔细检查是否兼容,并在更新之前备份数据。在完成更改后,确保所有应用程序都正常运行。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值