Repository navigation
Studio: AUTO W8A8 on ROCm RDNA keeps bf16 when the int8 plan still offloads - #17104
Merged
Merged
Conversation
…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.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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]
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
act_int8=TrueChange
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, explicitint8requests, NVIDIA and every non-RDNA path are unchanged.UNSLOTH_NATIVE_INT8_ACT=0still 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_quantNone, an offload policy.test_diffusion_backend.py -k "quant or offload or rdna or amd"a174823)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