Tune BF16 wgrad and fuse DeepEP metadata scale packing - #64
Draft
A-nnonymous wants to merge 3 commits into
Draft
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
artifacts/deepep_sonic_metadata_gap_breakdown_20260709.mdWhy
The latest A35B timeline shows Sonic compute is no longer the primary blocker after BF16 wgrad tuning. The remaining DeepEP -> Sonic up-projection path has a stable host-side bubble: the old sequence still shows
_gather_raw_scales_1x32_to_isa_kernel, followed by about 485 us p50 before the Sonic up GEMM launch. Same-launch-thread NVTX attributes stable portions of that bubble toview_dtype,empty,transpose, allocator work, and generic CUTE/QuACK wrapper setup.The fused metadata+scale path is the first step: it removes the separate host transition into raw-scale packing and gives the next optimizer a clear test/perf matrix for eliminating the remaining wrapper/carrier costs without changing numerics.
Validation
CUDA_VISIBLE_DEVICES=0 python -m pytest tests/ops/test_deepep_topk_metadata.py::TestCudaScalePacking -q --tb=short-> 9 passedCUDA_VISIBLE_DEVICES=0 python -m pytest tests/ops/test_deepep_topk_metadata.py -q --tb=short-> 74 passedCUDA_VISIBLE_DEVICES=0 python tests/ops/ncu_deepep_topk.py --config prod_a35b --with-scales --repeat 10->avg_gpu_ms=0.356854,packed_scales_shape=(1, 208044032)Notes For Reviewers
.ncu-repartifacts were intentionally not committed.