Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print warning if compiling pytorch ops with torch 1.7 and cuda 11 #3325

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions 3rdparty/CMake/FindPytorch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ if(NOT Pytorch_FOUND)
set_target_properties( torch PROPERTIES INTERFACE_COMPILE_OPTIONS "" )
set_target_properties( torch_cuda PROPERTIES INTERFACE_COMPILE_OPTIONS "" )
set_target_properties( torch_cpu PROPERTIES INTERFACE_COMPILE_OPTIONS "" )

if( CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.0" AND
Pytorch_VERSION GREATER_EQUAL "1.7" AND Pytorch_VERSION VERSION_LESS "1.9")
message( WARNING
"================================================================================\n"
" \n"
" You are compiling Open3D with CUDA 11 and Pytorch. This configuration may have \n"
" stability issues. See https://github.com/intel-isl/Open3D/issues/3324 and \n"
" https://github.com/pytorch/pytorch/issues/52663 for more information on this \n"
" problem. \n"
" \n"
" We recommend to compile Pytorch from source with compile flags. \n"
" '-Xcompiler -fno-gnu-unique' \n"
" \n"
"================================================================================\n"
)
endif()
endif()

# Get Pytorch_CXX11_ABI: True/False
Expand Down