Skip to content

FP8 inductor fullgraph test: allow one ulp on GPUs where Inductor fuses the dequant - #15107

Merged
danielhanchen merged 1 commit into
mainfrom
fp8-inductor-test-sm89
Oct 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fp8-inductor-test-sm89

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

test_fp8_scale_dequant_one_pass.py::test_inductor_fullgraph_dequant_matches_eager, added in #15071, fails on B200 for bf16:

  • [row-dtype1]
  • [tensor-dtype1]

Cause

The test compares bit patterns against the eager reference on every GPU.

  • sm89+: Inductor can emit fp8, so it fuses the torch dequant expression itself. Its bf16 rounding can land one ulp away from eager.
  • Below sm89 (T4, the case the test was written for): the dequant goes to the opaque op, so the result is bit-exact.

Change

  • Below sm89: where _fp8_e4m3fn_unsupported_in_trace holds, the test keeps the bit-exact check.
  • sm89+: it checks closeness within one ulp of the output dtype instead (rtol 2^-7 for bf16, 2^-10 for fp16, atol 0).

The fullgraph = True requirement is unchanged on every GPU.

Results

tests/test_fp8_scale_dequant_one_pass.py on B200:

torch main this PR
2.14.1 2 failed, 45 passed 47 passed
2.10.0 2 failed, 45 passed (also seen on 2.11.0, 2.12.1, 2.13.0) 47 passed

T4 keeps the bit-exact branch, so its results are unchanged.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T09:37:34.506252Z a27a1f9 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: a27a1f91f8

ℹ️ 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 e5c2cd6 into main Oct 24, 2026
3 of 14 checks passed
@danielhanchen
danielhanchen deleted the fp8-inductor-test-sm89 branch October 24, 2026 09:43
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