Skip to content

Studio: AUTO W8A8 on ROCm RDNA keeps bf16 when the int8 plan still offloads - #17104

Merged
danielhanchen merged 2 commits into
mainfrom
studio/rdna-auto-w8a8-resident-only
Nov 8, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
studio/rdna-auto-w8a8-resident-only

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

#17013 lets AUTO pick native int8 W8A8 on ROCm RDNA for the families it was measured on (Qwen-Image), and the code says it is resident only: "offload / low-VRAM keeps bf16". The gate only checked an explicit offload request (memory_mode / cpu_offload). Under automatic memory settings, a card too small for the transformer even at int8 still kept the int8 W8A8 scheme: the int8 re-plan did not fit resident, the bf16 plan's offload stayed, and the native scheme was applied under it, with the default compile tier switched on.

CPU fake runtime, Qwen-Image-2512 on a simulated 16 GiB RDNA card, no explicit offload:

before #17013 main this PR
placement offloaded offloaded offloaded
transformer bf16 native int8, act_int8=True bf16
speed tier off default off

Change

After the int8 re-plan, if the RDNA AUTO pick is active and the plan does not keep the transformer resident, AUTO declines: no native scheme, the bf16 plan, and the reason in the resolved status (auto int8 W8A8 on RDNA is resident-only; the '<policy>' offload keeps the bf16 transformer). Resident loads, explicit int8 requests, NVIDIA and every non-RDNA path are unchanged. UNSLOTH_NATIVE_INT8_ACT=0 still turns the AUTO pick off entirely.

Tests

test_auto_on_rdna_stays_bf16_when_the_int8_plan_still_offloads (test_diffusion_backend.py, the existing RDNA host stub with a 16 GiB device): nothing quantised, transformer_quant None, an offload policy.

arm test_diffusion_backend.py -k "quant or offload or rdna or amd"
main (a174823) 156 passed, 1 failed (the new test: int8 W8A8 under offload)
this PR 157 passed

The existing resident RDNA case (test_auto_on_rdna_runs_compiled_w8a8_for_a_measured_family) still picks int8 W8A8 with the default speed tier.

Not covered

  • No real RDNA card run: the routing is proven on the CPU fake runtime. A resident load on gfx1151 takes the same path as before.

…floads

The RDNA AUTO pick is measured for resident transformers only, but it was gated on an explicit offload
request; under automatic memory a card too small for even the int8 transformer kept the native int8
W8A8 scheme under the offload plan (and the compiled speed tier). When the int8 re-plan does not keep the
transformer resident, AUTO now declines to bf16 with the bf16 plan, as before #17013.
@danielhanchen danielhanchen self-assigned this Nov 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T04:11:17.927339Z 6d57971 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.

[skip ci]
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6d57971610

ℹ️ 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 dd2c39d into main Nov 8, 2026
@danielhanchen
danielhanchen deleted the studio/rdna-auto-w8a8-resident-only branch November 8, 2026 07:57
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