解决 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
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值