[None][fix] Exclude SM12x from bf16x2 FP8 cvt specialization in moe_a2a#15934
Open
waynehacking8 wants to merge 1 commit into
Open
[None][fix] Exclude SM12x from bf16x2 FP8 cvt specialization in moe_a2a#15934waynehacking8 wants to merge 1 commit into
waynehacking8 wants to merge 1 commit into
Conversation
The BF16 -> FP8 vec_convert specialization added in NVIDIA#11844 guards its cvt.rn.satfinite.e4m3x2.bf16x2 PTX on __CUDA_ARCH__ >= 1000. Consumer Blackwell (sm_120/sm_121, __CUDA_ARCH__ 1200/1210) passes that numeric check but has no bf16x2 source variant for this cvt, so ptxas rejects the TU and any --cuda_architectures 120/121 build of main fails: ptxas .../moeAlltoAllKernels.ptx, line 49340; error: Unexpected instruction types specified for 'cvt' Bound the specialization to the SM100 family; SM12x falls back to the generic float-path vec_convert (the specialization is a pure optimization, and the quantized a2a path is multi-device code anyway). Verified on an RTX PRO 6000 (CUDA 13.0): stock main fails at the two cvt lines with --cuda_architectures 120-real; with this change the full cpp build completes and libtensorrt_llm.so links. Signed-off-by: waynehacking8 <waynehacking8@gmail.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe compile-time CUDA architecture guard for the BF16→FP8 e4m3 paired-PTX ChangesArchitecture Guard Fix
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Description
Building main for consumer Blackwell (
--cuda_architectures "120-real", CUDA 13.0) currently fails at ptxas:Root cause: the BF16 -> FP8
vec_convertspecialization from #11844 emitscvt.rn.satfinite.e4m3x2.bf16x2behind__CUDA_ARCH__ >= 1000. sm_120/sm_121 (__CUDA_ARCH__1200/1210) pass that numeric check but don't have the bf16x2 source variant of this cvt, so ptxas rejects the TU and the whole120-real/121-realbuild dies.Fix: bound the specialization to the SM100 family (
>= 1000 && < 1200). SM12x falls back to the generic float-pathvec_convertdirectly above - the paired-cvt specialization is a pure optimization, and this is the quantized multi-device a2a path, so consumer single/dual-GPU setups don't exercise it in anger anyway.Test Coverage
--cuda_architectures "120-real"on CUDA 13.0 reproduces the two ptxas errors above (RTX PRO 6000 host, bare-metalbuild_wheel.py --cpp_only).moeAlltoAllKernels.cu.ocompiles andlibtensorrt_llm.so/libnvinfer_plugin_tensorrt_llm.solink (100%).PR Checklist
Summary by CodeRabbit