libtorch(C++)编译错误nvcc fatal: Option ‘–dependency-file’ requires one of ‘-M’, ‘-MM’, ‘-MD’ or ‘-MMD’ to be specified
使用vcpkg编译libtorch库时,总是失败。查看编译日志,定位真正的问题是一条编译指令未成功,报错"nvcc fatal: Option ‘–dependency-file’ requires one of ‘-M’, ‘-MM’, ‘-MD’ or ‘-MMD’ to be specified"。
为简单起见,我将这条nvcc编译指令抽象如下:
nvcc.exe -forward-unknown-to-host-compiler ${宏定义} ${包含目录} ${非-Xcompiler选项} -Xcompiler=" -Zi -Ob0 -Od /RTC1" -Xcompiler=/MDd -std=c++17 -Xcompiler=-MDd -DTH_HAVE_THREAD -Xcompiler= -MD -MT TensorFactories.cu.obj -MF T

最低0.47元/天 解锁文章
535

被折叠的 条评论
为什么被折叠?



