Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

SM arches 5.3, 6.2, 7.2 fail to build with RDC enabled. #1167

Closed
alliepiper opened this issue May 25, 2020 · 3 comments
Closed

SM arches 5.3, 6.2, 7.2 fail to build with RDC enabled. #1167

alliepiper opened this issue May 25, 2020 · 3 comments
Assignees
Labels
type: bug: functional Does not work as intended.

Comments

@alliepiper
Copy link
Collaborator

There are linker errors when any of those three architectures are targeted with RDC enabled. I've seen this on linux and windows, and also with nvcc 10.2 and 11.0.

nvcc -forward-unknown-to-host-compiler -ccbin=/usr/bin/c++ -gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -Xcompiler=-Werror -Xcompiler=-Wall -Xcompiler=-Wextra -Xcompiler=-Winit-self -Xcompiler=-Woverloaded-virtual -Xcompiler=-Wcast-qual -Xcompiler=-Wno-cast-align -Xcompiler=-Wno-long-long -Xcompiler=-Wno-variadic-macros -Xcompiler=-Wno-unused-function -Xcompiler=-Wno-unused-variable -Xcompiler=-Wlogical-op -Xcompiler=-Wno-noexcept-type -Werror all-warnings -Xcudafe --display_error_number -O3 -DNDEBUG -Xcompiler=-fPIC -Wno-deprecated-gpu-targets -shared -dlink testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o -o CMakeFiles/thrust.test.cuda.fill.dir/cmake_device_link.o  testing/libthrust.test.framework.a  -lcudadevrt  -lcudart_static
nvlink error   : Undefined reference to 'cudaGetParameterBuffer' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaLaunchDevice' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaGetLastError' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaGetDevice' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaGetErrorName' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaGetErrorString' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaDeviceGetAttribute' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaDeviceSynchronize' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
nvlink error   : Undefined reference to 'cudaPeekAtLastError' in 'testing/CMakeFiles/thrust.test.cuda.fill.dir/cuda/fill.cu.o' (target: sm_53)
@alliepiper alliepiper added the type: bug: functional Does not work as intended. label May 25, 2020
@alliepiper
Copy link
Collaborator Author

I've addressed this in my changes for #1159 by always disabling these arches by default. PR coming soon.

alliepiper added a commit to alliepiper/thrust that referenced this issue May 29, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 29, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 30, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 30, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 1, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
@brycelelbach
Copy link
Collaborator

These are all mobile GPU architectures. My guess is the libdevice in the main CUDA Toolkit does not have a variant for these architectures; there's probably some special libdevice that's part of the CUDA for Tegra toolkit. So, this isn't surprising.

alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 9, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 9, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
@alliepiper alliepiper self-assigned this Jun 10, 2020
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 10, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 11, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING
  - THRUST_ENABLE_EXAMPLE_FILECHECK

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Removed common_variables.cmake and simplified FileCheck hooks.
  - Set THRUST_ENABLE_EXAMPLE_FILECHECK to turn on FileCheck validation
  - Automatically detect and set THRUST_FILECHECK_EXECUTABLE if installed
    and filechecking is enabled.
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 26, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167:
  - Disable arches 53, 62, 72 for RDC-required tests, print warning
  - Error when ENABLE_RDC for tests/examples is set with a no-RDC arch.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit that referenced this issue Jun 26, 2020
Fixes #1159.

Also fixes or works around these issues:
- WAR #1167:
  - Disable arches 53, 62, 72 for RDC-required tests, print warning
  - Error when ENABLE_RDC for tests/examples is set with a no-RDC arch.
- Fixes #1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR #1174: remove warning promotion from tbb.cuda targets.
- WAR #976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
@alliepiper
Copy link
Collaborator Author

alliepiper commented Jun 26, 2020

Fixed in #1184.

There are two sets of options that are incompatible:

Set 1:

  • THRUST_ENABLE_COMPUTE_53
  • THRUST_ENABLE_COMPUTE_62
  • THRUST_ENABLE_COMPUTE_72

Set 2:

  • THRUST_ENABLE_TESTS_WITH_RDC
  • THRUST_ENABLE_EXAMPLES_WITH_RDC

Turning on any option in Set 1 + any option in Set 2 is now a configuration error.

--- Enabled CUDA architectures: sm_35 sm_50 sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_72 sm_75 sm_80 compute_80
CMake Error at cmake/ThrustCUDAConfig.cmake:125 (message):
  THRUST_ENABLE_EXAMPLES_WITH_RDC is incompatible with
  THRUST_ENABLE_COMPUTE_53, since sm_53 does not support RDC.
Call Stack (most recent call first):
  CMakeLists.txt:85 (include)

Additionally, targets that require RDC (currently the tests in testing/cuda) will omit the flags for the 53, 62, or 72 architectures if they are enabled. A NOTICE CMake message is printed with this information when any of these archs are enabled.

--- Enabled CUDA architectures: sm_35 sm_50 sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_72 sm_75 sm_80 compute_80
sm_53 does not support RDC. Targets that require RDC will be built without support for this architecture.
sm_62 does not support RDC. Targets that require RDC will be built without support for this architecture.
sm_72 does not support RDC. Targets that require RDC will be built without support for this architecture.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug: functional Does not work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants