MXFP8 Perf Improvement - #481
Conversation
📝 WalkthroughWalkthroughSM100 SDPA compilation adds LPT scheduling support for causal MXFP8 paths. Statistic-buffer resets now run on the kernel launch stream. MXFP8 kernels compute output amplitude maxima and update a provided buffer. Obsolete comments are removed. ChangesSM100 SDPA updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant api_dsl
participant _host
participant _kernel
participant _correction_warp_group
api_dsl->>api_dsl: Clear amax_o on launch stream
api_dsl->>_host: Pass amax_o buffer
_host->>_kernel: Forward amax_o_tensor
_kernel->>_correction_warp_group: Forward amax_o_tensor
_correction_warp_group->>_correction_warp_group: Compute valid-row maximum absolute output
_correction_warp_group->>amax_o: Atomically update global amax buffer
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@python/cudnn/sdpa/fwd/api_dsl.py`:
- Around line 978-983: Update the FP8 amax reset in the code constructing
amax_o_buf so amax_o_buf.zero_() is enqueued on current_stream before the MXFP8
kernel launch, matching the stream ordering used by the execute-time handle and
other amax resets.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 861c26f8-da62-40ed-80ab-9a7fdf0c2ba1
📒 Files selected for processing (5)
python/cudnn/sdpa/fwd/api_dsl.pypython/cudnn/sdpa/fwd/config_sm100.pypython/cudnn/sdpa/fwd/kernels/prefill_d128_f16_sm100.pypython/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm100.pypython/cudnn/sdpa/fwd/kernels/prefill_d128_mxfp8_sm100.py
vedaanta
left a comment
There was a problem hiding this comment.
looks good.
Maybe we dont need amax o here
|
@cudnn-ci-bot run |
|
🚀 Running mirror pipeline Branch: cudnn-gh/pr-481-529abf8 |
Before submitting
pre-commit runand committed any formatting changes.Affected area
Summary
Why
Related issues
API and compatibility impact
Testing
Summary by CodeRabbit
New Features
Bug Fixes
Documentation