visual-studio - 如何解决 "Code Generation value is not in the expected format ' [Arch],[使用CUDA编译darknet时出现代码]' "错误

标签 visual-studio opencv cudnn darknet

尝试使用 CUDA 10.0、cudnn 7.4 和 OpenCV 3.4.0 编译 Darknet。使用Cmake 3.10.1为VS 2017 Community生成项目文件。

使用 CUDA 10.0 编译 OpenCV。

使用 AlexeyAB/darknet 分支来构建 Windows 版本的 darknet。

配置 Cmake 以匹配 README.md 文件中引用的 Cmake 屏幕截图。 屏幕截图如下:

image screenshot

image screenshot

为 VS 2017 Community 配置、生成构建文件,打开构建文件。

编译几乎立即失败并出现错误:

   Description: Item 'src\activation_kernels.cu'  Code Generation value is not in the expected format '[Arch],[Code]'
   Project: darknet
   File: CUDA 10.0.targets, line 235

我查看了文件的第 235 行,但它并不能帮助我更好地理解错误。 VS 没有提供错误代码以及错误解释的链接,而且我没有找到任何可以帮助我理解错误和排除故障的信息。

硬件是配备 GTX 1060 GPU(计算模型 6.1)的戴尔笔记本电脑。没有 GPU 的暗网构建没有任何问题。

任何有关解决此问题的见解都将非常感激

最佳答案

我不确定这是否与我遇到的问题相同。我收到了同样的错误消息。原来我是在debug模式下输入Device参数的,而编译是在release模式下完成的。 CUDA C/C++下正确的Device参数应该是:

compute_30,sm_30;compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;

删除不适合您的设备的内容。

我在发布中放入的错误内容是:

compute_30,sm_30,compute_35,sm_35

而不是

compute_30,sm_30;compute_35,sm_35;

分号是分隔符,而不是逗号。

希望这可以帮助您和其他人。

关于visual-studio - 如何解决 "Code Generation value is not in the expected format ' [Arch],[使用CUDA编译darknet时出现代码]' "错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56095778/

相关文章:

C#:在 catch 中调试时,您能否得到未显式声明的异常?

windows - 视觉小尺寸语言

python - 二维中的离散或 bin LAB 颜色空间

java.lang.UnsatisfiedLinkError : org. opencv.core.Mat.n_Mat(IIILjava/nio/ByteBuffer;)J

c++ - 如何使用 NVIDIA cuDNN 计算 'full' 卷积?

python - 使用 Visual Studio 2015 安装 python 包时出错

c++ - OpenCV - 套接字接收到失真图像

python - 如何在 Windows 7 64 位上使用 theano 设置 cuDnn

windows - Windows 上不可预测的 CUDNN_STATUS_NOT_INITIALIZED

visual-studio-2010 - 在没有扩展管理器的情况下卸载 VS2010 扩展