CMAKE_CUDA_ARCHITECTURES set to ‘native’多版本与版本号矛盾问题,报错
- 1. 报错提醒如下图
- 2. 原因本地安装多个cuda版本导致native寻找到多个版本,导致报错
- 3. 具体配置需要根据你的显卡型号来确认
1. 报错提醒如下图
2. 原因本地安装多个cuda版本导致native寻找到多个版本,导致报错
If automatic GPU architecture detection fails, (as can happen if you have multiple GPUs installed), set the TCNN_CUDA_ARCHITECTURES environment variable for the GPU you would like to use. The following table lists the values for common GPUs. If your GPU is not listed, consult this exhaustive list.
原先设置如下:
-DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_COMPILER="/usr/local/cuda-12.0/bin/nvcc"
修改后设置如下:
-DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_CUDA_COMPILER="/usr/local/cuda-12.0/bin/nvcc"
3. 具体配置需要根据你的显卡型号来确认
参考下面的表格:
再次设置如下,即可: