SparseLinearAlgebra/spbla

CUB build issues with CUDA 11

mlxd opened this issue · 1 comments

mlxd commented

When using CUDA 11.1+ the following build error is observed:

In file included from /opt/cuda/bin/../targets/x86_64-linux/include/thrust/system/cuda/detail/execution_policy.h:33,
                 from /opt/cuda/bin/../targets/x86_64-linux/include/thrust/system/cuda/pointer.h:25,
                 from /opt/cuda/bin/../targets/x86_64-linux/include/thrust/system/cuda/memory_resource.h:25,
                 from /opt/cuda/bin/../targets/x86_64-linux/include/thrust/system/cuda/memory.h:24,
                 from /home/mlxd/DELME/review_spbla/spbla/spbla/sources/cuda/details/device_allocator.cuh:30,
                 from /home/mlxd/DELME/review_spbla/spbla/spbla/sources/cuda/cuda_matrix.hpp:30,
                 from /home/mlxd/DELME/review_spbla/spbla/spbla/sources/cuda/cuda_backend.cu:26:
/opt/cuda/bin/../targets/x86_64-linux/include/thrust/system/cuda/config.h:78:2: error: #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
   78 | #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.

This seems to stem from CUB being included as part of CUDA 11 and is reported elsewhere (see IBM/aihwkit#56, tensorflow/tensorflow#41803 for examples). The resolution seems to be not to download CUB if using CUDA 11.

@mlxd I've added SPBLA_WITH_CUB option (by default is OFF), so for now it must be possible to build with CUDA 11