Skip to content

FP8 e4m3fn scale dequant: pass enable_fp_fusion like every other launch - #14969

Merged
danielhanchen merged 1 commit into
mainfrom
fp8-scale-dequant-fp-fusion
Oct 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fp8-scale-dequant-fp-fusion

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

tests/test_triton_fp_fusion.py::test_every_launch_requests_fp_fusion fails on main since #14936:

AssertionError: Triton launches without enable_fp_fusion: ['fp8.py:243:_e4m3fn_scale_dequant_kernel']

Triton 3.9 defaults enable_fp_fusion to False, so every launch in unsloth/kernels passes enable_fp_fusion = True to keep one numeric behaviour across Triton versions. The gfx11 e4m3fn byte decoder launch added in #14936 does not.

Change

Pass enable_fp_fusion = True to the _e4m3fn_scale_dequant_kernel launch, as the other launches in fp8.py do. The kernel computes x * s with no add, so there is nothing to fuse into an FMA and its output is unchanged on every Triton version; this only brings the launch in line with the guard.

Testing

  • tests/test_triton_fp_fusion.py on main: 1 failed. With this change: 4 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T11:39:33.244454Z 9a3a5aa Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 9a3a5aa140

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit d954720 into main Oct 23, 2026
3 of 30 checks passed
@danielhanchen
danielhanchen deleted the fp8-scale-dequant-fp-fusion branch October 23, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant