facebookresearch / facebookresearch/faiss
[regression] cannot build GPU support for windows in v1.7.2
- Dominant language
- C++
- Stars
- 40.9k
- Forks
- 4.5k
- PR merge metrics
- No merged PRs in 30d
Description
When [building](https://github.com/conda-forge/faiss-split-feedstock/pull/49) for conda-forge, I get:
```
(base) D:\bld\faiss-split_1642028268414\work\_build_generic\faiss>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" -gencode=arch=compute_75,code=\"sm_75,compute_75\" -gencode=arch=compute_80,code=\"compute_80,compute_80\" -gencode=arch=compute_80,code=\"sm_80,compute_80\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64" -x cu -I"D:\bld\faiss-split_1642028268414\work" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -Xfatbin=-compress-all -std=c++17 -Xcompiler="/EHsc -Ob2" -D_WINDOWS -DNDEBUG -DFAISS_MAIN_LIB -DFINTEGER=int -D"CMAKE_INTDIR=\"Release\"" -Dfaiss_EXPORTS -D_WINDLL -D_MBCS -DWIN32 -D_WINDOWS -DNDEBUG -DFAISS_MAIN_LIB -DFINTEGER=int -D"CMAKE_INTDIR=\"Release\"" -Dfaiss_EXPORTS -Xcompiler "/EHsc /W1 /nologo /O2 /Fdfaiss.dir\Release\vc142.pdb /FS /MD /GR" -o faiss.dir\Release\GpuIcmEncoder.obj "D:\bld\faiss-split_1642028268414\work\faiss\gpu\GpuIcmEncoder.cu"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\functional(920): error : no instance of function template "std::_Invoker_ret<_Rx, false>::_Call [with _Rx=Concurrency::details::_Unit_type]" matches the argument list [D:\bld\faiss-split_1642028268414\work\_build_generic\faiss\faiss.vcxproj]
argument types are: (std::decay_tConcurrency::details::_Unit_type &>>)
detected during:
instantiation of "_Rx std::_Func_impl_no_alloc<_Callable, _Rx, _Types...>::_Do_call(_Types &&...) [with _Callable=std::decay_tConcurrency::details::_Unit_type &>>, _Rx=Concurrency::details::_Unit_type, _Types=<>]"
(896): here
instantiation of "std::_Func_impl_no_alloc<_Callable, _Rx, _Types...>::_Func_impl_no_alloc(_Other &&) [with _Callable=std::decay_tConcurrency::details::_Unit_type &>>, _Rx=Concurrency::details::_Unit_type, _Types=<>, _Other=std::remove_reference_tConcurrency::details::_Unit_type &>, =0]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xmemory(283): here
instantiation of "_Ty *std::_Global_new<_Ty,_Types...>(_Types &&...) [with _Ty=std::_Func_impl_no_allocConcurrency::details::_Unit_type &>>, Concurrency::details::_Unit_type>, _Types=Concurrency::details::_Unit_type &>>]"
(1012): here
instantiation of "void std::_Func_class<_Ret, _Types...>::_Reset(_Fx &&) [with _Ret=Concurrency::details::_Unit_type, _Types=<>, _Fx=std::remove_reference_tConcurrency::details::_Unit_type &>]"
(1143): here
instantiation of "std::function<_Fty>::function(_Fx) [with _Fty=Concurrency::details::_Unit_type (), _Fx=lambda []()->Concurrency::details::_Unit_type, =int]"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\ppltasks.h(2348): here
1 error detected in the compilation of "D:/bld/faiss-split_1642028268414/work/faiss/gpu/GpuIcmEncoder.cu".
GpuIcmEncoder.cu
```
AFAICT, `GpuIcmEncoder.{cu,h}` was added between 1.7.1 & 1.7.2, in #1978. CC @KinglittleQ
The error seems to only appear for CUDA=11.{0,1}; for 10.2 and 11.2 the build succeeds.
Contributor guide
Research direction
Reproduce the Windows conda-forge build from PR #49 with CUDA 11.0 or 11.1 and inspect faiss/gpu/GpuIcmEncoder.cu and GpuIcmEncoder.h, which were introduced in PR #1978. Compare the failing build with CUDA 10.2 and 11.2, and consider the compiler error in ppltasks.h. Done means GPU support builds successfully for the affected CUDA versions without regressing the versions that already succeed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100