Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test updates of CCCL (thrust, cub, libcudacxx) to 2.1.0. #1464

Closed
wants to merge 7 commits into from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Apr 26, 2023

This PR tests a rapids-cmake branch with CCCL (thrust, cub, libcudacxx) updated to 2.1.0. Do not merge this PR. The changes will be merged upstream in rapids-cmake after all libraries pass CI.

@cjnolet cjnolet added 5 - DO NOT MERGE Hold off on merging; see PR for details improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 28, 2023
@cjnolet
Copy link
Member

cjnolet commented May 16, 2023

@bdice just checking in as I'm taking an inventory of open PRs for the 23.06 release. Is this PR still needed?

@bdice
Copy link
Contributor Author

bdice commented May 17, 2023

Also responded offline -- tl;dr yes, we will need to work on this but I'm trying to fix up cudf's PR before making recommendations on how to address the device lambda issues for raft and other libraries.

Target is 23.08, not 23.06 23.10.

@bdice bdice changed the base branch from branch-23.06 to branch-23.10 July 21, 2023 17:53
@bdice bdice force-pushed the cccl-update-2.1.0 branch from 8f5b7ba to d796a9f Compare August 30, 2023 16:05
@bdice
Copy link
Contributor Author

bdice commented Aug 30, 2023

cudf's CCCL update PR is fully working so I'm starting work on RAFT now. I'm planning to work on the build/CMake/conda/etc. side and get to a point where C++ is building with the right versions of CCCL. Once we see C++ failures (if any), I would like to pass this off to a RAFT dev so that I can continue setting up CCCL update PRs for other RAPIDS libraries. I can help identify the kinds of changes that might be needed -- let's see what fails and then I can advise accordingly. cc: @cjnolet

@github-actions github-actions bot added the cpp label Sep 12, 2023
@bdice
Copy link
Contributor Author

bdice commented Sep 12, 2023

CUDA 12 builds were failing with:

/opt/conda/conda-bld/_build_env/targets/x86_64-linux/include/crt/host_defines.h:86: error: "__forceinline__" redefined [-Werror]
...
/opt/conda/conda-bld/work/cpp/build/_deps/libcudacxx-src/lib/cmake/libcudacxx/../../../include/cuda/std/detail/__config:39: note: this is the location of the previous definition

Full error output:

FAILED: CMakeFiles/CORE_TEST.dir/test/core/sparse_matrix.cpp.o 
sccache /opt/conda/conda-bld/_build_env/bin/x86_64-conda-linux-gnu-c++ -DCUTLASS_NAMESPACE=raft_cutlass -DFMT_HEADER_ONLY=1 -DRAFT_COMPILED -DRAFT_EXPLICIT_INSTANTIATE_ONLY -DRAFT_SYSTEM_LITTLE_ENDIAN=1 -DSPDLOG_FMT_EXTERNAL -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -I/opt/conda/conda-bld/work/cpp/test -I/opt/conda/conda-bld/work/cpp/include -I/opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../.. -I/opt/conda/conda-bld/work/cpp/build/_deps/libcudacxx-src/lib/cmake/libcudacxx/../../../include -I/opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../.. -I/opt/conda/conda-bld/work/cpp/build/_deps/nvidiacutlass-src/include -I/opt/conda/conda-bld/work/cpp/build/_deps/nvidiacutlass-build/include -I/opt/conda/conda-bld/_build_env/include -I/opt/conda/conda-bld/work/cpp/internal -isystem /opt/conda/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/include -fdebug-prefix-map=/opt/conda/conda-bld/work=/usr/local/src/conda/libraft-headers-only-23.10.00a -fdebug-prefix-map=/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho=/usr/local/src/conda-prefix  -I/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/x86_64-linux/include -I/opt/conda/conda-bld/_build_env/targets/x86_64-linux/include  -L/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/x86_64-linux/lib -L/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/x86_64-linux/lib/stubs -L/opt/conda/conda-bld/_build_env/targets/x86_64-linux/lib -L/opt/conda/conda-bld/_build_env/targets/x86_64-linux/lib/stubs -O3 -DNDEBUG -std=gnu++17 -fPIE -Wno-deprecated-declarations -Wall -Werror -Wno-unknown-pragmas -Wno-error=deprecated-declarations -DCUDA_API_PER_THREAD_DEFAULT_STREAM -pthread -fopenmp -MD -MT CMakeFiles/CORE_TEST.dir/test/core/sparse_matrix.cpp.o -MF CMakeFiles/CORE_TEST.dir/test/core/sparse_matrix.cpp.o.d -o CMakeFiles/CORE_TEST.dir/test/core/sparse_matrix.cpp.o -c /opt/conda/conda-bld/work/cpp/test/core/sparse_matrix.cpp
In file included from /opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/targets/x86_64-linux/include/cuda_runtime_api.h:147,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/detail/detect_cuda_runtime.cuh:38,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/util_arch.cuh:41,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/util_debug.cuh:40,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/system/cuda/config.h:43,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/system/cuda/detail/execution_policy.h:35,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/iterator/detail/device_system_tag.h:23,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/iterator/iterator_traits.h:62,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/distance.h:25,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/span.hpp:28,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/coo_matrix.hpp:21,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/host_coo_matrix.hpp:18,
                 from /opt/conda/conda-bld/work/cpp/test/core/sparse_matrix.cpp:17:
/opt/conda/conda-bld/_build_env/targets/x86_64-linux/include/crt/host_defines.h:86: error: "__forceinline__" redefined [-Werror]
   86 | #define __forceinline__ \
      | 
In file included from /opt/conda/conda-bld/work/cpp/build/_deps/libcudacxx-src/lib/cmake/libcudacxx/../../../include/cuda/std/utility:14,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/util_macro.cuh:35,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/util_arch.cuh:38,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/dependencies/cub/cub/cmake/../../cub/util_debug.cuh:40,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/system/cuda/config.h:43,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/system/cuda/detail/execution_policy.h:35,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/iterator/detail/device_system_tag.h:23,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/iterator/iterator_traits.h:62,
                 from /opt/conda/conda-bld/work/cpp/build/_deps/thrust-src/thrust/cmake/../../thrust/distance.h:25,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/span.hpp:28,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/coo_matrix.hpp:21,
                 from /opt/conda/conda-bld/work/cpp/include/raft/core/host_coo_matrix.hpp:18,
                 from /opt/conda/conda-bld/work/cpp/test/core/sparse_matrix.cpp:17:
/opt/conda/conda-bld/work/cpp/build/_deps/libcudacxx-src/lib/cmake/libcudacxx/../../../include/cuda/std/detail/__config:39: note: this is the location of the previous definition
   39 |         #define __forceinline__
      | 
cc1plus: all warnings being treated as errors

This is the same issue that was fixed in NVIDIA/libcudacxx#476, but that hasn't been released yet in CCCL 2.1.0. I tried to add a patch upstream in rapids-cmake for this issue in libcudacxx 2.1.0, but it's a pretty big patch (+866 / -888 lines) and didn't apply cleanly, so it might take a lot of manual reworking. We might be better served by going straight to CCCL 2.2.0 where this fix will land but that will require waiting for the 2.2.0 tag (coming soon?) as well as adopting changes in rapids-cmake to support the monorepo.

Alternatively we might be able to pin to a commit hash of libcudacxx between releases 2.1.0 and 2.2.0 that includes these fixes.

For now, I have added #include <cuda_runtime.h> to the affected files with a note describing the workaround and solution (remove when adopting CCCL 2.2.0).

@bdice bdice changed the base branch from branch-23.10 to branch-23.12 September 26, 2023 21:35
@bdice bdice changed the base branch from branch-23.12 to branch-24.02 December 7, 2023 03:09
@bdice
Copy link
Contributor Author

bdice commented Dec 8, 2023

Closing in favor of #2049.

@bdice bdice closed this Dec 8, 2023
rapids-bot bot pushed a commit that referenced this pull request Dec 8, 2023
This PR is needed to change the one piece of RAFT that requires `cuda::proclaim_return_type` for compatibility with CCCL (Thrust) 2.2.0. This pulls out part of the diff of #1464, which we will be able to close in favor of a new PR after this is merged.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Divye Gala (https://github.com/divyegala)

URL: #2048
rapids-bot bot pushed a commit that referenced this pull request Dec 19, 2023
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update.

Depends on #2048.

Replaces #1464.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Robert Maynard (https://github.com/robertmaynard)

URL: #2049
ChristinaZ pushed a commit to ChristinaZ/raft that referenced this pull request Jan 17, 2024
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update.

Depends on rapidsai#2048.

Replaces rapidsai#1464.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Robert Maynard (https://github.com/robertmaynard)

URL: rapidsai#2049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - DO NOT MERGE Hold off on merging; see PR for details cpp improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

2 participants