cmake工程出现“CMAKE_CUDA_ARCHITECTURES must be non-empty if set.“的解决方法

cmake工程出现"CMAKE_CUDA_ARCHITECTURES must be non-empty if set."的解决方法

-- The CUDA compiler identification is unknown

CMake Error at /usr/share/cmake-3.24/Modules/CMakeDetermineCUDACompiler.cmake:602 (message):

Failed to detect a default CUDA architecture.


这个问题是因为你在cmakelist中设置了

#set(CMAKE_CUDA_COMPILER /usr/local/cuda-11.0/bin/nvcc)

#enable_language(CUDA)

而且这个set指定的位置不对造成的,注释掉或者调整为正确的路径就可以了

相关推荐
Warson_L1 天前
Python `Annotated` 与 LangGraph Reducer 学习笔记
python
韩师傅1 天前
海天线算法的前世今生
python·计算机视觉
韩师傅1 天前
当你的甲方设备过烂,要如何快速出效果?
python·计算机视觉
Warson_L1 天前
LangGraph的MessageState and HumanMessage
python
韩师傅1 天前
当你的甲方吐槽天空不够蓝,你应该如何应对
python·计算机视觉
Warson_L1 天前
python的类&继承
python
Warson_L1 天前
类型标注/type annotation
python
ThreeS1 天前
手搓MiniVLA全实战教程-一步一步用pytorch解释原理与思路
人工智能·python
金銀銅鐵1 天前
[Python] 模 n 乘法的逆元计算器
python·数学·游戏
AlfredZhao1 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80