Skip to content

FP8 byte dequant: pass enable_fp_fusion at the launch - #14416

Merged
danielhanchen merged 1 commit into
mainfrom
fp8-bytes-fp-fusion
Oct 21, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fp8-bytes-fp-fusion

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/test_triton_fp_fusion.py::test_every_launch_requests_fp_fusion fails on main since #14408: the new _e4m3fn_bytes_dequant_kernel launch in unsloth/kernels/fp8.py does not pass enable_fp_fusion, which every Triton launch in unsloth/kernels sets explicitly.

Change

  • Pass enable_fp_fusion = True at that launch, like the other FP8 dequant kernels in the file.

The output does not change: after the byte decode (exact in fp32) the kernel does a single multiply by the block scale and one rounding to the output dtype, so there is no multiply-add for the backend to contract.

Validation

On B200 (pre-sm89 path forced as in the test file): tests/test_triton_fp_fusion.py and tests/test_fp8_pre_sm89_byte_dequant.py give 99 passed, including bit equality with _torch_blockwise_dequant over every byte value, all shapes, block shapes and output dtypes. On main the fusion test fails with Triton launches without enable_fp_fusion: ['fp8.py:722:_e4m3fn_bytes_dequant_kernel'].

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-21T00:29:22.987157Z 2a2eb65 Manual request
🔒 Security Review ⚠️ Failed 2026-10-20T23:45:19.429823Z
We couldn’t complete this review. Comment @codex security review to try again.
2a2eb65 PR opened
ℹ️ 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

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 2a2eb65a0d

ℹ️ 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 d568d16 into main Oct 21, 2026
@danielhanchen
danielhanchen deleted the fp8-bytes-fp-fusion branch October 21, 2026 00:32
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