Repository navigation
Conversation
The example's compile-only coverage kernels include `tcgen05.mma ... kind::i8`, which sm_103a does not provide, so on a cc 10.3 GPU the backend falls back to an sm_100a module even when the detected sm_103a is passed as the device hint. The runtime gate accepted cc 10.3, the driver could not JIT the sm_100a PTX (CUDA_ERROR_INVALID_PTX, 218) and the example failed. Also require the module's own `.target` to run on the GPU before loading it: an arch-specific target needs that exact compute capability, a family target the same major and at least its minor. Otherwise the example takes the existing PTX-only path, which assembles the module with ptxas. Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
This branch has not been deployed
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
Closes #1628.
The
tcgen05example's compile-only coverage kernels includetcgen05.mma ... kind::i8, whichsm_103adoes not provide. On a cc 10.3 GPU, the backend therefore builds ansm_100amodule even with the detectedsm_103ahint. The runtime gate accepted cc 10.3, the driver could not JIT the PTX (CUDA_ERROR_INVALID_PTX, 218), and the example failed.The example now also checks the module's own
.targetbefore loading:a) needs that exact compute capability;f) needs the same major and at least its minor;Otherwise the example takes the existing PTX-only path, which assembles the module with ptxas. The gate on the GPU generation (
can_execute_tcgen05_ptx) is unchanged.Changes
cuda-oxide/crates/rustc-codegen-cuda/examples/tcgen05/src/main.rs: before loading the embedded module, compare its.targetwith the GPU's compute capability, and take the PTX-only path when the module cannot run there.Testing
scripts/smoketest.sh -o 'tcgen05|gemm_sol':scripts/smoketest.sh -o '^redux_f32$|generated_intrinsics_blackwell': 2/2 PASS.Not run on B200 (cc 10.0). There the module target matches the GPU, so the example executes as before.
just -f cuda-oxide/Justfile checkpasses -- not run for this change; the change is confined to the example, which is its own workspacecuda-oxide/scripts/smoketest.sh -o 'tcgen05|gemm_sol'(above)Checklist
git commit -s)