Improve CUDA 13.1 compatibility with newer glibc - #31
Open
remer wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pass
-U_GNU_SOURCE -D_DEFAULT_SOURCEto Krasis NVCC invocations on Linux. This avoids thersqrt/rsqrtfexception-specification conflict between newer glibc headers and CUDA 13.0/13.1 headers while retaining the standard/default interfaces.Krasis already centralizes optional NVCC host arguments in
nvcc_host_compiler_args(), so the compatibility flags apply consistently without changing the system compiler or non-Linux builds.Observed failure
With CUDA 13.1 and glibc 2.43, CUDA kernel compilation fails with errors equivalent to:
Changing the selected host compiler did not resolve the collision because it is between the visible glibc and CUDA declarations.
Validation
git diff --checkCompatibility scope
The observed Ubuntu 26.04/CUDA 13.1 combination is outside CUDA 13.1's validated distribution matrix, so this is a portability improvement rather than a claim that Krasis is defective on a supported CUDA configuration. CUDA 13.3 validates Ubuntu 26.04.
An open PR against NVIDIA's cuda-samples repository documents the same CUDA 13.1/glibc conflict and feature-macro workaround: NVIDIA/cuda-samples#403