diff --git a/3rdparty/stdgpu/stdgpu.cmake b/3rdparty/stdgpu/stdgpu.cmake index fb9a64e09fd..a725f228029 100644 --- a/3rdparty/stdgpu/stdgpu.cmake +++ b/3rdparty/stdgpu/stdgpu.cmake @@ -7,9 +7,8 @@ include(ExternalProject) ExternalProject_Add( ext_stdgpu PREFIX stdgpu - # Jun 20 2024. Later versions need CUDA 11.5 and an API update (stdgpu::pair) - URL https://github.com/stotko/stdgpu/archive/1b6a3319f1fbf180166e1bbc1d75f69ab622a0a0.tar.gz - URL_HASH SHA256=faa3bf9cbe49ef9cc09e2e07e60d10bbf3b896edb6089c920bebe0f850fd95e4 + URL https://github.com/stotko/stdgpu/archive/2588168d226bd17229dbf58d821549580791089d.tar.gz + URL_HASH SHA256=86e50789bbe21c57f64358c6acbd4481d56c1e45ce9ba1fb5c5c8482c3973215 DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/stdgpu" UPDATE_COMMAND "" CMAKE_ARGS diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b047cd0b82..971b4440e46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/cmake/Open3DShowAndAbortOnWarning.cmake b/cmake/Open3DShowAndAbortOnWarning.cmake index f1ac292fe38..c95bfa75ac0 100644 --- a/cmake/Open3DShowAndAbortOnWarning.cmake +++ b/cmake/Open3DShowAndAbortOnWarning.cmake @@ -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 $<$:/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}") diff --git a/cpp/open3d/core/hashmap/CUDA/StdGPUHashBackend.h b/cpp/open3d/core/hashmap/CUDA/StdGPUHashBackend.h index 823e19f9901..d6707a6ce17 100644 --- a/cpp/open3d/core/hashmap/CUDA/StdGPUHashBackend.h +++ b/cpp/open3d/core/hashmap/CUDA/StdGPUHashBackend.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include #include @@ -90,7 +91,7 @@ class StdGPUAllocator { // accessible in raw CUDA kernels. template using InternalStdGPUHashBackendAllocator = - StdGPUAllocator>; + StdGPUAllocator>; template using InternalStdGPUHashBackend = @@ -252,7 +253,7 @@ void StdGPUHashBackend::Erase(const void* input_keys, template struct ValueExtractor { OPEN3D_HOST_DEVICE buf_index_t - operator()(const thrust::pair& x) const { + operator()(const stdgpu::pair& x) const { return x.second; } }; diff --git a/docs/compilation.rst b/docs/compilation.rst index 270c928b327..fa663c0d72d 100644 --- a/docs/compilation.rst +++ b/docs/compilation.rst @@ -25,8 +25,8 @@ System requirements * macOS: Install with Homebrew: ``brew install cmake`` * Windows: Download from: `CMake download page `_ -* 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 `_ to @@ -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 `_ and `PyTorch issue #52663 `_ for more information on this problem. Official PyTorch wheels 1.9 and later