Skip to content

Studio tests: the two-card compiled W8A8 test judges each card on its own arch (follow-up to #17078) - #17195

Merged
danielhanchen merged 2 commits into
mainfrom
dh/test-two-card-w8a8-mixed-rocm
Nov 9, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
dh/test-two-card-w8a8-mixed-rocm

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Follow-up to #17078. That PR made the compiled int8 W8A8 linear decide per card on ROCm: an RDNA3 / RDNA4 card runs it, and any other arch (for example CDNA gfx942) stays eager. The production routing is correct. The real two-card test it added still assumed both cards run the compiled linear:

  • it checked readiness only on the current card (_require_the_compiled_linear())
  • it required calls + 1 on both cards
  • it required devices == {"cuda:0": None, "cuda:1": None}

On a mixed ROCm host with an RDNA card 0 and a CDNA card 1, card 1 correctly stays eager. The call count then does not move, so the test fails even though production behaves as intended. With a CDNA card 0 and an RDNA card 1, the test is skipped entirely and the RDNA card is never checked.

Change (test only)

  • The test asks production for each card's own decision (_fused_w8a8(torch.device("cuda", i))). It skips only when neither card can run the compiled linear.
  • On CUDA, where no card is refused by arch, it still requires both cards to be ready.
  • For each card it expects calls + 1 only where that card is ready. Output must be bit-identical to eager on every card.
  • The final per-card state must match: None for a ready card, a refusal reason for the others.

No product code changes.

Testing

  • pytest -o addopts= tests/test_diffusion_native_quant_fused.py on CPU: 48 passed, 5 skipped. The skipped tests, this one included, need real cards.
  • I had no two-card host here, mixed ROCm or otherwise, so the changed test did not execute in this PR. The failure on main follows directly from the old assertions and the routing in _fused_w8a8 (diffusion_native_quant.py, the _rocm_fused_w8a8_refusal branch), which records a refusal for the non-RDNA card and returns no compiled function there.

@danielhanchen danielhanchen self-assigned this Nov 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-09T02:57:13.780855Z e21b0e1 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. More of your lovely PRs please.

Reviewed commit: e21b0e1900

ℹ️ 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 edc48a6 into main Nov 9, 2026
@danielhanchen
danielhanchen deleted the dh/test-two-card-w8a8-mixed-rocm branch November 9, 2026 04:51
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