CSA: request ex2.approx.ftz through fastmath= so the compressor builds at the cutlass-dsl floor - #463
Merged
Conversation
…s at the cutlass-dsl floor ``cute.math.exp2``'s ``approx``/``ftz`` keywords are newer than the ``nvidia-cutlass-dsl[cu13]>=4.5.0`` floor python/pyproject.toml resolves to, so the ratio=128 compressor's fast-exp path raised ``TypeError: exp2() got an unexpected keyword argument 'approx'`` on any environment that installs that floor -- 14 failures in test/python/fe_api/csa/test_CSA_compressor.py, all from this one call site (NVIDIA#460). ``fastmath=True`` is accepted by both versions and lowers to the same ``ex2.approx.ftz.f32`` the r128 tolerance contract is calibrated on, so this is a pure spelling change: * cutlass-dsl 4.5.0 before: 14 failed, 74 passed. After: 88 passed, 1 skipped. * cutlass-dsl 4.6.1 after: the 16-kernel reg_probe_csa_compressor_r128.py PTX is byte-identical to before this change -- same register counts, 0 spill / 0 stack, and 1104 ex2.approx.ftz.f32 across the set -- so nothing changes on 4.6. * cutlass-dsl 4.5.0 after: the same 1104 ex2.approx.ftz.f32, and no no-.ftz ex2.approx.f32 anywhere. * gate_csa_compressor_r128.py: GATE PASS 21/21 on both 4.5.0 and 4.6.1. Verified on B200 (CC 10.0), cuDNN 9.23, driver 590.48.01. Signed-off-by: zky <kaiyue.zhou@z.ai>
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 Changesexp2 invocation change
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Anerudhan
approved these changes
Jul 31, 2026
Merged
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.
cute.math.exp2'sapprox/ftzkeywords are newer than thenvidia-cutlass-dsl[cu13]>=4.5.0floor python/pyproject.toml resolves to, so theratio=128 compressor's fast-exp path raised
TypeError: exp2() got an unexpected keyword argument 'approx'on any environment that installs that floor -- 14 failuresin test/python/fe_api/csa/test_CSA_compressor.py, all from this one call site (#460).
fastmath=Trueis accepted by both versions and lowers to the sameex2.approx.ftz.f32the r128 tolerance contract is calibrated on, so this is a purespelling change:
byte-identical to before this change -- same register counts, 0 spill / 0 stack, and
1104 ex2.approx.ftz.f32 across the set -- so nothing changes on 4.6.
ex2.approx.f32 anywhere.
Verified on B200 (CC 10.0), cuDNN 9.23, driver 590.48.01.
Signed-off-by: zky kaiyue.zhou@z.ai
This addresses the CSA half of #460 only (the 14
test_CSA_compressor.pyfailures attributed tob950af1). It does not touch the 25 wgrad failures from #456 -- those reproduce on 4.6.1 as well per the table in the issue, andcutlass.utils.rubin_helpersis a separate gap.Summary by CodeRabbit