Skip to content

Commit

Permalink
Update CUDA requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
stotko committed Dec 6, 2024
1 parent cb788ee commit f4bc1da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ if(BUILD_CUDA_MODULE)
endif()
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 17)
if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "10.1")
message(FATAL_ERROR "CUDA 10.0 and older are not supported. Please upgrade to CUDA 10.1 or newer.")
if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "11.5")
message(FATAL_ERROR "CUDA 11.4 and older are not supported. Please upgrade to CUDA 11.5 or newer.")
endif()
endif()

Expand Down
20 changes: 3 additions & 17 deletions cmake/Open3DShowAndAbortOnWarning.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,14 @@ function(open3d_show_and_abort_on_warning target)
string(REPLACE ";" "," DISABLE_NVCC_WARNINGS "${DISABLE_NVCC_WARNINGS}")

set(CUDA_FLAGS "--Werror cross-execution-space-call,deprecated-declarations")
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "10.2")
string(APPEND CUDA_FLAGS " --Werror all-warnings")
endif()
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0")
string(APPEND CUDA_FLAGS " --Werror ext-lambda-captures-this")
endif()
string(APPEND CUDA_FLAGS " --Werror all-warnings")
string(APPEND CUDA_FLAGS " --Werror ext-lambda-captures-this")
string(APPEND CUDA_FLAGS " --expt-relaxed-constexpr")
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.2")
string(APPEND CUDA_FLAGS " --diag-suppress ${DISABLE_NVCC_WARNINGS}")
else()
string(APPEND CUDA_FLAGS " -Xcudafe --diag_suppress=[${DISABLE_NVCC_WARNINGS}]")
endif()
string(APPEND CUDA_FLAGS " --diag-suppress ${DISABLE_NVCC_WARNINGS}")

# Host compiler flags
if (MSVC)
set(CUDA_DISABLE_MSVC_WARNINGS ${DISABLE_MSVC_WARNINGS})
if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "11.2")
list(APPEND CUDA_DISABLE_MSVC_WARNINGS $<$<CONFIG:Debug>:/wd4700>) # uninitialized local variable used (thrust)
endif()
if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "11.1")
list(APPEND CUDA_DISABLE_MSVC_WARNINGS /wd4515) # namespace uses itself (thrust)
endif()
string(REPLACE ";" "," CUDA_DISABLE_MSVC_WARNINGS "${CUDA_DISABLE_MSVC_WARNINGS}")

string(APPEND CUDA_FLAGS " -Xcompiler /W4,/WX,${CUDA_DISABLE_MSVC_WARNINGS}")
Expand Down
6 changes: 3 additions & 3 deletions docs/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ System requirements
* macOS: Install with Homebrew: ``brew install cmake``
* Windows: Download from: `CMake download page <https://cmake.org/download/>`_

* CUDA 10.1+ (optional): Open3D supports GPU acceleration of an increasing number
of operations through CUDA on Linux. We recommend using CUDA 11.0 for the
* CUDA 11.5+ (optional): Open3D supports GPU acceleration of an increasing number
of operations through CUDA on Linux. We recommend using CUDA 12+ for the
best compatibility with recent GPUs and optional external dependencies such
as Tensorflow or PyTorch. Please see the `official documentation
<https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_ to
Expand Down Expand Up @@ -250,7 +250,7 @@ pipelines from Open3D-ML in the python package, set ``BUNDLE_OPEN3D_ML=ON`` and
Open3D-ML from GitHub during the build with
``OPEN3D_ML_ROOT=https://github.com/isl-org/Open3D-ML.git``.

.. warning:: Compiling PyTorch ops with CUDA 11 and PyTorch < 1.9 may have
.. warning:: Compiling PyTorch ops with PyTorch < 1.9 may have
stability issues. See `Open3D issue #3324 <https://github.com/isl-org/Open3D/issues/3324>`_
and `PyTorch issue #52663 <https://github.com/pytorch/pytorch/issues/52663>`_
for more information on this problem. Official PyTorch wheels 1.9 and later
Expand Down

0 comments on commit f4bc1da

Please sign in to comment.