Skip to content

Compatibility with CUDA-Toolkit 13.0.0 #465

@lujobi

Description

@lujobi

It seems that this project is not (yet) compatible with the newest version of the CUDA Toolkit (Version 13.0).

Please find attached our investigation.
Any help would be greatly appreciated!

Thank you in advance.


Investigation

Simply building it with the documented command yields the following error:

$ cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bin
...
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find thrust (missing: THRUST_INCLUDE_DIR) (Required is at least
  version "1.13.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/Findthrust.cmake:50 (find_package_handle_standard_args)
  src/stdgpu/CMakeLists.txt:7 (find_package)

After some investigating, it seems that the include directory $CUDAToolkit_INCLUDE_DIRS has been restructured. As such thrust has been moved into a cccl subdir.

After manually setting CUB_INCLUDE_DIR, LIBCUDACXX_INCLUDE_DIR and THRUST_INCLUDE_DIR the configure step succeeds. However the build command fails with an error that originates from within the c++ std-lib.

Configure Command:

cmake -B build -S . \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=bin \
        -DCUB_INCLUDE_DIR="/usr/local/cuda/targets/sbsa-linux/include/cccl" \
        -DLIBCUDACXX_INCLUDE_DIR="/usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/detail/libcxx/include" \
        -DTHRUST_INCLUDE_DIR="/usr/local/cuda/targets/sbsa-linux/include/cccl"

Build Output:

cmake --build build --config Release --parallel 8

[ 66%] Building CXX object src/stdgpu/CMakeFiles/stdgpu.dir/cuda/impl/memory.cpp.o
In file included from /usr/include/c++/13/iterator:65,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__type_traits/is_primary_template.h:33,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__iterator/incrementable_traits.h:32,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__iterator/concepts.h:40,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__algorithm/ranges_iterator_concept.h:23,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__algorithm/iterator_operations.h:24,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__algorithm/lower_bound.h:25,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/__algorithm/binary_search.h:25,
                 from /usr/local/cuda/targets/sbsa-linux/include/cccl/cuda/std/detail/libcxx/include/algorithm:651,
                 from /home/user/Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/cuda/impl/device.cpp:18:
/usr/include/c++/13/bits/stream_iterator.h:55:31: error: ‘char_traits’ does not name a type
   55 |            typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
      |                                           ^~~~~~~~~~~
/usr/include/c++/13/bits/stream_iterator.h:55:42: error: expected ‘>’ before ‘<’ token
   55 |            typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
      |                                          ^
/usr/include/c++/13/bits/stream_iterator.h:57:48: error: ‘_Dist’ was not declared in this scope
   57 |     : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
      |                                                ^~~~~
/usr/include/c++/13/bits/stream_iterator.h:57:77: error: template argument 3 is invalid
   57 |     : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
      |                                                                             ^
/usr/include/c++/13/bits/stream_iterator.h:62:15: error: ‘basic_istream’ does not name a type
   62 |       typedef basic_istream<_CharT, _Traits> istream_type;
      |               ^~~~~~~~~~~~~
/usr/include/c++/13/bits/stream_iterator.h:65:7: error: ‘istream_type’ does not name a type
   65 |       istream_type*     _M_stream;
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/stream_iterator.h:79:36: error: expected ‘)’ before ‘&’ token
   79 |       istream_iterator(istream_type& __s)
      |                       ~            ^
      |                                    )
/usr/include/c++/13/bits/stream_iterator.h: In constructor ‘constexpr std::istream_iterator<_Tp, _CharT, _Traits>::istream_iterator()’:
/usr/include/c++/13/bits/stream_iterator.h:76:9: error: class ‘std::istream_iterator<_Tp, _CharT, _Traits>’ does not have any field named ‘_M_stream’
   76 |       : _M_stream(0), _M_value(), _M_ok(false) {}
      |        ^~~~~~~~~

...
===================== OUTPUT CROPPED BY ~18000 Lines =====================
...

/home/user/Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/limits_detail.h: In static member function ‘static constexpr long double stdgpu::numeric_limits<long double>::infinity()’:
/home/user/Open3D/build/stdgpu/src/ext_stdgpu/src/stdgpu/../stdgpu/impl/limits_detail.h:720:12: error: ‘HUGE_VALL’ was not declared in this scope
  720 |     return HUGE_VALL;
      |            ^~~~~~~~~
make[5]: *** [src/stdgpu/CMakeFiles/stdgpu.dir/build.make:90: src/stdgpu/CMakeFiles/stdgpu.dir/impl/iterator.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:157: src/stdgpu/CMakeFiles/stdgpu.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/ext_stdgpu.dir/build.make:86: stdgpu/src/ext_stdgpu-stamp/ext_stdgpu-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1827: CMakeFiles/ext_stdgpu.dir/all] Error 2

I can provide a full log if this seems helpful. However I fear that the problem lies somewhere else within our config.

System:

  • OS: Ubuntu 24.04
  • Target Machine: Nvida DGX Spark (ARMv9)
  • Compiler: GCC 13
  • Backend: CUDA (CUDA Toolkit 13.0)
  • Library version: master

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions