Repository navigation
refactor(cuda-device): move BF16 conversions out of tcgen05 - #887
Merged
Merged
Conversation
Signed-off-by: Zihua Wu <[email protected]>
Follow-up to the pack-direction rename in PR NVIDIA#887: gemm_sol and tcgen05_matmul READMEs, the cublas correctness-test comment, and the book's tcgen05 epilogue snippet still named the old packing helper, which now denotes the bf16x2 -> f32x2 unpack.
Collaborator
|
Gist: right move. Packing two f32s into bf16 works on any sm_80+ GPU, so it never belonged in the Blackwell-only tcgen05 module, and the old name meant the opposite thing in two different modules. The rename rides through the intrinsics catalog, so the ABI entry and the dialect op stay untouched. The NaN fix in What I checked and did:
Heads-up for release notes: this is a breaking rename with no compat re-export, which I think is fine pre-1.0. |
nihalpasham
approved these changes
Aug 16, 2026
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.
Problem
f32values into abf16pair works on any sm_80+ GPU, but the only source-level API lived incuda_device::tcgen05, the module for Blackwell-only (sm_100) tensor-core ops. Using it on, say, an sm_120 GPU looked like it required TCGEN05 hardware.Fix
cuda_device::convert, where all other conversions already liveconvert::cvt_bf16x2_f32, matching the module convention and the PTX mnemonic orderbits | 0x0040) instead of letting the payload vanish intoInfGotchas
tcgen05paths stops compiling (loud error, and the project is pre-1.0)i0071,cuda_intrinsics::convert::cvt_f32x2_bf16x2, and the nvvm op keep their names; only the cuda-device surface movedTesting and validation
cuda-intrinsics-gen checkclean; ABI history preserved at 986 entriesbf16x2_arithexecuted on SM120: all eight packed ops pass