You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing KNN, always this error, ask for help you have encountered similar situations, how to solve.
D:\conda\envs\3D\python.exe D:\M3DM-main\version.py
PyTorch version: 1.8.0+cu111
CUDA available: True
CUDA version: 11.1
torchvision 0.9.0+cu111
ninja.version 1.11.1
CUDA available: True
CUDA version: 11.1
PyTorch version: 1.8.0+cu111
Torchvision version: 1.8.0+cu111
setuptools 60.2.0
Traceback (most recent call last):
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1667, in _run_ninja_build
subprocess.run(
File "D:\conda\envs\3D\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
When testing KNN, always this error, ask for help you have encountered similar situations, how to solve.
D:\conda\envs\3D\python.exe D:\M3DM-main\version.py
PyTorch version: 1.8.0+cu111
CUDA available: True
CUDA version: 11.1
torchvision 0.9.0+cu111
ninja.version 1.11.1
CUDA available: True
CUDA version: 11.1
PyTorch version: 1.8.0+cu111
Torchvision version: 1.8.0+cu111
setuptools 60.2.0
Traceback (most recent call last):
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1667, in _run_ninja_build
subprocess.run(
File "D:\conda\envs\3D\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\M3DM-main\version.py", line 19, in
import knn_cuda
File "D:\conda\envs\3D\lib\site-packages\knn_cuda_init_.py", line 38, in
knn = load_cpp_ext("knn")
File "D:\conda\envs\3D\lib\site-packages\knn_cuda_init.py", line 26, in load_cpp_ext
ext = load(
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1079, in load
return _jit_compile(
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1292, in _jit_compile
_write_ninja_file_and_build_library(
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1404, in _write_ninja_file_and_build_library
_run_ninja_build(
File "D:\conda\envs\3D\lib\site-packages\torch\utils\cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'knn': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" knn.o knn.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?searchsorted_cuda@native@at@@ya?AVTensor@2@AEBV32@0_N1@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:D:\conda\envs\3D\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\conda\envs\3D\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\lib/x64" cudart.lib /out:knn.pyd
FAILED: knn.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/link.exe" knn.o knn.cuda.o /nologo /DLL c10.lib c10_cuda.lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?searchsorted_cuda@native@at@@ya?AVTensor@2@AEBV32@0_N1@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@yahxz torch.lib /LIBPATH:D:\conda\envs\3D\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\conda\envs\3D\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\lib/x64" cudart.lib /out:knn.pyd
正在创建库 knn.lib 和对象 knn.exp
knn.o : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) char const * __cdecl c10::detail::torchCheckMsgImpl(char const *)" (_imp?torchCheckMsgImpl@detail@c10@@YAPEBDPEBD@Z),函数 "public: void __cdecl c10::ivalue::Object::unsafeRemoveSlot(unsigned __int64)" (?unsafeRemoveSlot@Object@ivalue@c10@@QEAAX_K@Z) 中引用了该符号
knn.o : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) char const * __cdecl c10::detail::torchCheckMsgImpl(char const *,char const *)" (_imp?torchCheckMsgImpl@detail@c10@@YAPEBDPEBD0@Z),函数 "public: void __cdecl c10::ivalue::Future::markCompleted(struct c10::IValue,class c10::optional<class std::vector<class std::reference_wrapper,class std::allocator<class std::reference_wrapper > > >)" (?markCompleted@Future@ivalue@c10@@QEAAXUIValue@3@V?$optional@V?$vector@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@v?$allocator@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@@2@@std@@@3@@z) 中引用了该符号
knn.o : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) void __cdecl c10::detail::torchInternalAssertFail(char const *,char const *,unsigned int,char const *,char const *)" (_imp?torchInternalAssertFail@detail@c10@@YAXPEBD0I00@Z),函数 "public: __cdecl std::_Func_impl_no_alloc<class <lambda_b78dc8f7805f29b232495c7b8c891ef4>,void,struct c10::ivalue::Future &>::_Func_impl_no_alloc<class <lambda_b78dc8f7805f29b232495c7b8c891ef4>,void,struct c10::ivalue::Future &><class <lambda_b78dc8f7805f29b232495c7b8c891ef4> const &,0>(class <lambda_b78dc8f7805f29b232495c7b8c891ef4> const &)" (??$?0AEBV<lambda_b78dc8f7805f29b232495c7b8c891ef4>@@$0A@@?$_Func_impl_no_alloc@V<lambda_b78dc8f7805f29b232495c7b8c891ef4>@@XAEAUFuture@ivalue@c10@@@std@@qeaa@AEBV<lambda_b78dc8f7805f29b232495c7b8c891ef4>@@@z) 中引用了该符号
knn.o : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) void __cdecl c10::detail::torchInternalAssertFail(char const *,char const *,unsigned int,char const *,struct c10::detail::CompileTimeEmptyString)" (_imp?torchInternalAssertFail@detail@c10@@YAXPEBD0I0UCompileTimeEmptyString@12@@z),函数 "public: __cdecl c10::impl::InlineMultiStreamGuard::InlineMultiStreamGuard(class c10::ArrayRef)" (??0?$InlineMultiStreamGuard@VVirtualGuardImpl@impl@c10@@@impl@c10@@qeaa@V?$ArrayRef@VStream@c10@@@2@@z) 中引用了该符号
knn.o : error LNK2019: 无法解析的外部符号 "private: static class std::vector<class std::reference_wrapper,class std::allocator<class std::reference_wrapper > > __cdecl c10::ivalue::Future::extractDataPtrs(struct c10::IValue const &)" (?extractDataPtrs@Future@ivalue@c10@@ca?AV?$vector@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@v?$allocator@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@@2@@std@@AEBUIValue@3@@z),函数 "public: void __cdecl c10::ivalue::Future::markCompleted(struct c10::IValue,class c10::optional<class std::vector<class std::reference_wrapper,class std::allocator<class std::reference_wrapper > > >)" (?markCompleted@Future@ivalue@c10@@QEAAXUIValue@3@V?$optional@V?$vector@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@v?$allocator@V?$reference_wrapper@$$CBVDataPtr@c10@@@std@@@2@@std@@@3@@z) 中引用了该符号
knn.o : error LNK2019: 无法解析的外部符号 "public: long * __cdecl at::Tensor::data_ptr(void)const " (??$data_ptr@J@Tensor@at@@QEBAPEAJXZ),函数 "public: long * __cdecl at::Tensor::data(void)const " (??$data@J@Tensor@at@@QEBAPEAJXZ) 中引用了该符号
knn.pyd : fatal error LNK1120: 6 个无法解析的外部命令
ninja: build stopped: subcommand failed.
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: