Skip to content

Restore GCC 14 with CUDA 12.9 shuffle workaround - #4939

Merged
ttnghia merged 3 commits into
NVIDIA:release/26.08from
res-life:experiment/gcc14-shuffle-workaround
Aug 4, 2026
Merged

Restore GCC 14 with CUDA 12.9 shuffle workaround#4939
ttnghia merged 3 commits into
NVIDIA:release/26.08from
res-life:experiment/gcc14-shuffle-workaround

Conversation

@res-life

@res-life res-life commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Fixes #4937.

Summary

  • restore the JNI build toolchain to GCC 14
  • replace the shuffle_split std::pair return type with an aggregate result
  • preserve structured-binding behavior and update the explicit test container type

Root cause

CUDA 12.9 cudafe++ crashes while instantiating GCC 14's concepts-based std::pair
constructor constraints for the shuffle result types. This previously forced the JNI build back to
GCC 13. ARM64 nvCOMP 5.3 is built with GCC 14 and requires __cxa_call_terminate, which the GCC 13
link does not provide.

Using an aggregate avoids the compiler crash without changing the shuffle algorithm. GCC 14 can
then link nvCOMP 5.3 and supplies __cxa_call_terminate through its nonshared compatibility
library, without adding a newer dynamic libstdc++ requirement.

This replaces the GCC 13 toolchain workaround introduced by #4468 while retaining compatibility
with CUDA 12.9.

Validation

  • reproduced the ARM64 GCC 13 final-link failure: nvCOMP 5.3.0.16 contains 20 undefined
    __cxa_call_terminate references, and GCC 13 does not provide the symbol
  • passed the matching ARM64 Rocky Linux 8 GCC 14 final-link probe; GCC 14 provides
    __cxa_call_terminate through libstdc++_nonshared.a
  • reproduced the shuffle_split.cu crash with CUDA 12.9.86 and GCC 14.2.1 before the change
  • compiled and linked the JNI native libraries with CUDA 12.9.86, GCC 14.2.1, and nvCOMP 5.3.0.16
    after the change
  • verified the resulting libcudf.so has no unresolved relocations with Rocky Linux 8
    libstdc++.so.6.0.25
  • completed a clean x86_64 package build with CUDA 12.9.86 and GCC 14.2.1
  • passed all 18 SHUFFLE_SPLIT native tests, including MixedValidity
  • repository-pinned clang-format v20.1.8 passes

Signed-off-by: Chong Gao <chongg@nvidia.com>
@res-life
res-life requested a review from a team as a code owner August 4, 2026 07:16
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR restores GCC 14 for native builds while avoiding CUDA 12.9's std::pair compiler crash.

  • Replaces the shuffle_split pair return type with an aggregate that preserves structured binding.
  • Updates the native test container and member accesses for the aggregate.
  • Aligns the build environment and CI image on GCC toolset 14.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
build/env.sh Changes the default native build command from GCC toolset 13 to GCC toolset 14.
ci/Dockerfile Installs GCC toolset 14 as the CI image's required compiler toolchain.
src/main/cpp/src/shuffle_split.hpp Introduces an aggregate shuffle result and updates the public native function declaration while retaining structured-binding compatibility.
src/main/cpp/src/shuffle_split.cu Updates the shuffle implementation to return the new aggregate without changing the result or metadata computation.
src/main/cpp/tests/shuffle_split.cu Completes the prior requested fix by using the aggregate container and .result member consistently.

Reviews (2): Last reviewed commit: "Fix shuffle split test result access" | Re-trigger Greptile

Comment thread src/main/cpp/tests/shuffle_split.cu
Chong Gao added 2 commits August 4, 2026 15:25
Signed-off-by: Chong Gao <chongg@nvidia.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
@res-life

res-life commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

build

@res-life res-life self-assigned this Aug 4, 2026

@NvTimLiu NvTimLiu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the CI scripts env.sh + Dockerfile

Please find someone help check the source code changes, thanks!

@res-life

res-life commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

cuda12-arm64 passed in the rapids-JNI-for-dev pipeline, seq id is: 103
cuda13-arm64 failed, it's because of downloading Thrift error, it's not relevant to this fix. Please ignore.
It's safe to merge this PR.

@res-life
res-life requested a review from a team August 4, 2026 14:09
@res-life

res-life commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

cuda13-arm64 failure is related to rapidsai/cudf#23445

@ttnghia
ttnghia merged commit 9243d07 into NVIDIA:release/26.08 Aug 4, 2026
6 checks passed
@sameerz sameerz added build bug Something isn't working labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants