Skip to content

INT8 attention long-probe test: fakes follow quantise / _cuda_attention mode (diffusion red since #18004) - #18035

Merged
danielhanchen merged 1 commit into
mainfrom
ci-int8-long-probe-test
Nov 16, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-int8-long-probe-test

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

#18004 (INT8 attention on by default) gave quantise and _cuda_attention in core/inference/diffusion_int8_attention.py a new mode argument. studio/backend/tests/test_diffusion_int8_attention_long_probe.py (from #17796) replaces both with CPU stand-ins that still take the old arguments. All 7 tests in the file fail on main, which makes (Python 3.13, diffusion) red for every PR based on b2ad0b4493 or later:

TypeError: _fake_card.<locals>.quantise() takes from 4 to 5 positional arguments but 6 were given
KeyError: 'long'
assert (False)

The KeyError and the failed asserts follow from the same TypeError: the card check catches the error from the stand-in and reports a failed check, so the assertions about what it verified fail. With only the stand-ins updated, all 7 pass.

The change in #18004 is fine. The test's fakes did not follow it.

Change

  • The fake quantise takes mode (default MODE_MAIN), and the _cuda_attention stand-in becomes a function with the same parameters as the real one and passes mode through.
  • _fake_card now checks that each stand-in takes exactly the real function's parameters, by name. The next signature change then fails every test with update the fake quantise: it takes [...], instead of a TypeError that the card check swallows and turns into confusing assertion failures.

No production code changes.

Verification

  • tests/test_diffusion_int8_attention_long_probe.py: 7 failed on main, 7 passed with this change.
  • Adding a parameter to the real quantise makes all 7 fail with the update the fake quantise message.
  • tests/test_diffusion_int8*.py and tests/test_diffusion_attention*.py: 1044 passed, 307 skipped.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T22:46:01.719581Z 5cece5c 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. Breezy!

Reviewed commit: 5cece5c7a5

ℹ️ 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 9034f08 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the ci-int8-long-probe-test branch November 16, 2026 22:55
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