[CUDA][complex] Define `LIBCUDACXX_ENABLE_SIMPLIFIED_COMPLEX_OPERATIONS` in CUDA build (#117061)
An upcoming CUDA release will migrate to CCCL, and we need this define to preserve current complex behavior: https://nvidia.github.io/libcudacxx/standard_api/numerics_library/complex.html CC @miscco @ptrblck Pull Request resolved: https://github.com/pytorch/pytorch/pull/117061 Approved by: https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
parent
c203d88795
commit
4a48899b6e
|
@ -48,6 +48,10 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.4)
|
|||
message(FATAL "GCC-9.4 or newer is required to compile PyTorch, but found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
# This define is needed to preserve behavior given anticpated changes to cccl/thrust
|
||||
# https://nvidia.github.io/libcudacxx/standard_api/numerics_library/complex.html
|
||||
string(APPEND CMAKE_CUDA_FLAGS "-DLIBCUDACXX_ENABLE_SIMPLIFIED_COMPLEX_OPERATIONS")
|
||||
|
||||
if(LINUX)
|
||||
include(cmake/CheckAbi.cmake)
|
||||
string(APPEND CMAKE_CXX_FLAGS " -D_GLIBCXX_USE_CXX11_ABI=${GLIBCXX_USE_CXX11_ABI}")
|
||||
|
|
Loading…
Reference in New Issue