perf(gdr): improve SM100 KKT solve occupancy - #41
Open
Butterfingrz wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Hi! Could you take a look at this PR when you get a chance. Thanks! |
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.
Improve SM100 KKT Solve Occupancy
Summary
T.annotate_min_blocks_per_sm(8)to the fixed-length and varlen KKT solve kernels on the shared SM100/SM103 path.Correctness validation
Tests ran through the final production path on one B200 with Torch 2.8.0+cu128 and TileLang 0.1.13.
python -m pytest -q tests/test_gdr_unit.py tests/test_function_signature.py -m 'not slow'— 115 passed, 6 deselected.python -m pytest -q tests/test_gdr_unit.py -m slow— 6 passed, 114 deselected.Performance Results (B200 / SM100)
Benchmark B=1, total T=32768, D=128, and BF16 Q/K/V across five head configurations and three sequence layouts. Use three alternating A/B pairs, 10 warmups, 100 repeats, CUDA Graphs, and paired medians. Use one 148-SM B200, driver 580.126.09, Torch 2.8.0+cu128, and TileLang 0.1.13. Clocks are not fixed.
Baseline: c18a486 (unchanged in 7c7dfe1). Candidate: 44814ca, source-identical to the measured candidate.
The table reports the isolated KKT lane from the
auto_cp=Falsecampaign.auto_cpis not an input to the isolated kernel call. Theauto_cp=Truecampaign reproduces the result with a 0.947493 geometric-mean ratio.32k_4seq_randuses seed 42 and lengths[7212, 7072, 13725, 4759].Performance Summary
auto_cp=Falseand 1.52% withauto_cp=True. Both arms use the same fused-forward source.n=6loses 15 / 15 cases ton=8with a 1.0177 geometric-mean ratio.NCU Occupancy Increase
NCU 2026.2.1 profiles
hk16_hv32/32k_1seqon one B200. Both runs use a 16,384-CTA grid and 128-thread CTAs.gpu__time_duration.sumlaunch__grid_sizelaunch__block_sizelaunch__registers_per_threadlaunch__occupancy_limit_registerslaunch__waves_per_multiprocessorsm__warps_active.avg.pct_of_peak_sustained_activesm__throughput.avg.pct_of_peak_sustained_elapsedgpu__compute_memory_throughput.avg.pct_of_peak_sustained_elapsedThe baseline is register-limited to four CTAs per SM. The candidate is register-limited to eight CTAs per SM. The grid and block size stay unchanged. Waves per SM halve. The achieved active-warp percentage doubles. The NCU duration improves by 3.89%. The paired CUDA Graph result for the same row improves by 4.43%.
Scope
flash_qla/ops/gated_delta_rule/chunk/blackwell/kkt_solve.py. Preserve fixed-length and varlen behavior, arithmetic, layouts, masks, launch geometry, and output types.