haofeixu / aanet

[CVPR'20] AANet: Adaptive Aggregation Network for Efficient Stereo Matching
Apache License 2.0
521 stars 100 forks source link

AANet代码模块编译失败 #55

Closed fox-panda-cat closed 1 year ago

fox-panda-cat commented 3 years ago

你好 @haofeixu @Ilya-Muromets ,我试着用管理员运行git bash,在anaconda激活环境状态下编译nets/deform_conv/build.sh ,结果失败了,我的环境是win10+cuda10.0.130+cudnn7.6.2.24+py3.7.4+pytorch1.2.0。我想问下我该如何编译这个模块,或者能否提供win10下编译好的deform_conv模块,谢谢。

下面是我编译失败弹出的主要信息: (1) running build_ext ----windows operation system ----compiler_info: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.00.24245 版 版权所有(C) Microsoft Corporation。保留所有权利。

用法: cl [ 选项... ] 文件名... [ /link 链接选项... ]

----match: <re.Match object; span=(35, 46), match='19.00.24245'> building 'deform_conv_cuda' extension creating build creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.2 7.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\21 058.conda\envs\pytorch-aanet\lib\site-packages\torch\include -IC:\Users\21058. conda\envs\pytorch-aanet\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\TH -I C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\THC "-I C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" -IC:\Users\210 58.conda\envs\pytorch-aanet\include -IC:\Users\21058.conda\envs\pytorch-aanet\ include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tool s\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual St udio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86) \Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10 \include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10 .0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362. 0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC :\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" "-ID:\Progr am Files\mingw64\include" /EHsc /Tpsrc/deform_conv_cuda.cpp /Fobuild\temp.win-am d64-3.7\Release\src/deform_conv_cuda.obj /MD /wd4819 /EHsc -DTORCH_API_INCLUDE_E XTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 deform_conv_cuda.cpp C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/uti l/Exception.h(28): warning C4275: 非 dll 接口 class“std::exception”用作 dll 接口 class“c10::Error”的基 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.2 7.29110\include\vcruntime_exception.h(48): note: 参见“std::exception”的声明 C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/uti l/Exception.h(28): note: 参见“c10::Error”的声明 C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/uti l/Exception.h(29): warning C4251: “c10::Error::msgstack”: class“std::vector<st d::string,std::allocator>”需要有 dll 接口由 class“c10::Error”的客户 端使用 C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/uti l/Exception.h(29): note: 参见“std::vector<std::string,std::allocator>”的声明 (2) with [ K=c10::TensorTypeId, V=c10::TensorTypeIdRegistry::TypeIdName ] C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/cor e/TensorTypeIdRegistration.h(49): note: 参见“ska::flat_hashmap<c10::TensorTypeI d,c10::TensorTypeIdRegistry::TypeIdName,std::hash,std::equal to,std::allocator<std::pair<K,V>>>”的声明 with [ K=c10::TensorTypeId, V=c10::TensorTypeIdRegistry::TypeIdName ] C:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\include\c10/cor e/TensorTypeIdRegistration.h(50): warning C4251: “c10::TensorTypeIdRegistry::mut ex_”: class“std::mutex”需要有 dll 接口由 class“c10::TensorTypeIdRegistry”的客户 端使用 (3) C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe -c src/def orm_conv_cuda_kernel.cu -o build\temp.win-amd64-3.7\Release\src/deform_conv_cuda _kernel.obj -IC:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\i nclude -IC:\Users\21058.conda\envs\pytorch-aanet\lib\site-packages\torch\includ e\torch\csrc\api\include -IC:\Users\21058.conda\envs\pytorch-aanet\lib\site-pac kages\torch\include\TH -IC:\Users\21058.conda\envs\pytorch-aanet\lib\site-packa ges\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10. 0\include" -IC:\Users\21058.conda\envs\pytorch-aanet\include -IC:\Users\21058. conda\envs\pytorch-aanet\include "-IC:\Program Files (x86)\Microsoft Visual Stud io\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Fi les (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\W indows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Ki ts\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include \10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.1836 2.0\cppwinrt" "-ID:\Program Files\mingw64\include" -Xcompiler /EHsc -Xcompiler / wd4819 -Xcompiler /MD -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALFCONVERSIONS _ -DCUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXT ENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0

C:/Users/21058/.conda/envs/pytorch-aanet/lib/site-packages/torch/include\ATen/co re/ivalue_inl.h(265): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/21058/.conda/envs/pytorch-aanet/lib/site-packages/torch/include\ATen/co re/ivalue_inl.h(271): warning: base class dllexport/dllimport specification diff ers from that of the derived class

C:/Users/21058/.conda/envs/pytorch-aanet/lib/site-packages/torch/include\ATen/co re/ivalue_inl.h(333): warning: field of class type without a DLL interface used in a class with a DLL interface

C:/Users/21058/.conda/envs/pytorch-aanet/lib/site-packages/torch/include\ATen/co re/ivalue_inl.h(334): warning: field of class type without a DLL interface used in a class with a DLL interface

Error: Internal Compiler Error (codegen): "there was an error in verifying the l genfe output!"

deform_conv_cuda_kernel.cu error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bi n\nvcc.exe' failed with exit status 2

haofeixu commented 1 year ago

Hi @fox-panda-cat , sorry for the late response.

If this issue is still relavant to you, I would suggest to try our new GMStereo model: https://haofeixu.github.io/unimatch/ & https://github.com/autonomousvision/unimatch. No CUDA op is required. A Colab demo is also provided to try our model in your browser. Hope it helps, thanks.