Skip to content

Studio: prebuilt CUTLASS int8 GEMM with the dequant epilogue fused, raced per arch (FLUX.3 klein INT8 -19.8% on L4) - #17486

Merged
danielhanchen merged 10 commits into
mainfrom
studio-int8-cutlass
Nov 11, 2026
Merged

danielhanchen merged 10 commits into
mainfrom
studio-int8-cutlass

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Studio's INT8 ConvRot diffusion path runs its int8 GEMM on a Triton kernel (i8mm_dq) where the arch gate allows it, and on cuBLAS _int_mm plus a separate dequant everywhere else. That leaves three gaps:

This PR adds a prebuilt (ahead-of-time) CUTLASS 2.x int8 GEMM with torchao's dequant epilogue fused into it, for sm75 (fp16 out) and sm80 / sm86 / sm89 (bf16 out). It works the same whatever Triton is installed, is checked bit for bit against today's reference on every card before use, and is raced per weight shape against today's path, so auto mode never picks it where it is slower.

What it is

  • studio/native_kernels/int8_gemm/: one CUTLASS 2.x s8 x s8 -> s32 GEMM per tile, with an epilogue visitor that reproduces torchao's epilogue op for op: c * x_scale in the x_scale dtype (int32 -> fp32 -> bf16 rounds twice, as torch does; an fp16 x_scale computes in fp32, as torchao does), the cast, * w_scale (rounded to the output dtype only when the scale has it), + bias, the final cast. Every product and sum uses __fmul_rn / __fadd_rn, so nothing contracts into an FMA.
    • sm80 family: 15 tiles, SASS for sm_80, sm_86 and sm_89, bf16 out, x_scale bf16 / fp32, w_scale bf16 / fp32, with and without bias.
    • sm75 family: 7 tiles, SASS for sm_75, fp16 out, x_scale fp16 / fp32, w_scale fp16 / bf16 / fp32, with and without bias.
    • The sm75 family also carries the epilogue of Studio's native W8A8 Linear (diffusion_native_quant), the module fp16-only cards load FLUX.3 INT8 into: (c * x_scale) * w_scale in fp32, then one cast to fp16.
    • No PTX: other archs never JIT it and keep their current path.
  • The host side is a plain C ABI (ui8_abi_version, ui8_num_tiles, ui8_tile_info, ui8_has_kernel, ui8_gemm), linked against the static CUDA runtime, libstdc++ and libgcc. The Linux library needs only glibc. There is no torch or Python ABI in it, so one binary per OS serves every torch minor. It is built with CUDA 12.8, so it also runs on CUDA 13 drivers.
  • diffusion_int8_cutlass.py loads it with ctypes and launches it on torch's current stream, so CUDA graph capture works. Absent, unloadable, wrong ABI, ROCm or CPU torch, or UNSLOTH_DIFFUSION_INT8_CUTLASS=0: today's path, unchanged.

Numerics and the fail-closed probe

Every tile is probed once per card for every scale-dtype pair it serves. The probe uses ragged M and N tails, K below and above one tile, with and without bias, M = 1, and int32 products one or two units off a 16-bit rounding midpoint (both signs). Output is compared with torch.equal against the generic torchao reference, which matches diffusion_int8_gemm.reference() bit for bit for bf16 (unit test). A tile that fails any case is never used. A failed launch at runtime drops the prebuilt kernel on that card and runs the same math on today's path.

Selection

When the int8 Linears are swapped, every distinct weight shape (N, K, scale dtypes, bias) is timed on random operands at M = 512 and M = 4096 against today's path:

  • the Triton kernel where Studio runs it today;
  • otherwise cuBLAS _int_mm plus one read of its int32 output. This is a lower bound on the stock cost, because the stock epilogue fuses into its consumer under torch.compile.

A tile replaces today's path only when it is at least 2% faster. A Linear whose large-M race keeps today's path is not touched, so it keeps the Inductor-fused stock epilogue. Winners persist per card, torch, CUDA, Triton, library build and source hash.

Kill switches:

  • UNSLOTH_DIFFUSION_INT8_CUTLASS=0: the whole lever, and the install step.
  • =1: skip the race and always take the fastest probed tile.

On fp16-only cards, the native W8A8 Linear races its weight shapes on its first eager forward, before any CUDA graph capture. Its eager _int_mm path, the one CUDA graphs record, then runs the won tile in place of _int_mm plus the fp32 epilogue. Its own rotation and activation quant are untouched, and so is its compiled path.

The fused ConvRot rotation and activation quant (#17230) stay in front of it unchanged. rotq_h16 / rotq_h16x produce the same codes and scales, and only the GEMM behind them changes. On sm75, where neither the rotation kernel nor Triton runs, a won Linear runs the module's own rotation and torchao's own fp16 activation quant, then the fp16 kernel.

Distribution

  • .github/workflows/prebuilt-int8-gemm.yml, dispatch only, in the same shape as prebuilt-cuda-wheels.yml. It builds unsloth_studio_i8gemm-1.0.0-py3-none-manylinux_2_28_x86_64.whl (in the manylinux_2_28 container, CUDA 12.8 from NVIDIA's rhel8 repo) and ...-py3-none-win_amd64.whl (NVIDIA's Authenticode-checked installer, MSVC x64, static runtime). It smoke-loads each wheel the way Studio does on a GPU-less runner, signs with Sigstore under the release-signing environment, and uploads to prebuilt-wheels-cu13 only when publish: true.
  • install_python_stack._ensure_int8_gemm() runs after flash-attn. It installs the wheel (about 3.3 MB, --no-deps) for an NVIDIA CUDA torch on x86_64 Linux and Windows when the release carries it. Otherwise it does nothing: no published asset, ROCm, macOS, no torch, or UNSLOTH_STUDIO_SKIP_I8GEMM_INSTALL=1. Failures only warn.
  • Windows: the same source builds with nvcc + MSVC; the baseline ships CUTLASS 2.x int8 kernels on Windows from the same headers. The DLL has no dependent DLLs (static CUDA runtime and MSVC runtime), and the loader looks for unsloth_i8gemm.dll. The Windows wheel build has not run yet (see below).

Results

Microbench, held (power-settled) CUDA-graph timings at the hot shapes. "Raced" is the per-step int8 GEMM time with the race applied, relative to today's path on that card.

card stack today's path FLUX.3 klein Qwen-Image-2.1 MiniMax-H3
A100-40GB torch 2.14.1, Triton 3.7.1 Triton i8mm_dq 0.924 0.929 0.953
A100-40GB torch 2.14.1, Triton 3.8.0 cuBLAS 0.723 0.763 0.771
L4 torch 2.14.1, Triton 3.7.1 Triton i8mm_dq 0.959 0.986 1.000 (no shape won)
L4 torch 2.14.1, Triton 3.8.0 cuBLAS 0.808 0.832 0.959
T4 (Kaggle) torch 2.11.0 cuBLAS + epilogue 0.956 vs _int_mm + one read; 0.588 vs _int_mm + eager epilogue 0.930 / 0.644 not run

Correctness in the same runs: 6.6 to 8.2 billion output elements per card, compared bitwise against the reference. Every probed tile, every scale-dtype pair, with and without bias, ragged and special-value cases: 0 mismatches. The 1-ulp negative control was caught on every card. On A100 and L4 the Triton kernel also matched the same reference: 0 mismatches.

End to end, FLUX.3 klein INT8, 1024x1024, base (merge base 57a486b) vs head, each in a fresh process, interleaved:

Colab L4, each arm a fresh process (fresh Studio home, so every head run pays its race), base and head interleaved, 6 to 8 images per run:

stack today's path base s/image (4 runs) head s/image (4 runs) per image s/step base -> head
torch 2.14.1, Triton 3.8.0 (Colab default) cuBLAS 10.53 / 10.53 / 10.59 / 10.54 8.45 / 8.46 / 8.35 / 8.45 -19.8% 0.640 -> 0.510
torch 2.13.0, Triton 3.7.1 (fresh CUDA 13 install) Triton i8mm_dq 8.89 / 8.87 / 8.88 / 8.88 8.55 / 8.60 / 8.50 / 8.60 -3.6% 0.535 -> 0.516
  • A/A noise: base2, a second base process, landed at 10.54 and 8.84 s/image, inside 0.6% of base.
  • Head on Triton 3.8 (8.45 s) is faster than base on Triton 3.7 (8.88 s), so a torch 2.14 install no longer loses the fused path.
  • The race won all 3 of FLUX.3's weight shapes on L4 (3072x3072, 18432x3072, 3072x9216), at both M buckets, against both baselines. 1542 prebuilt-kernel calls per run, no graph breaks, no recompiles.
  • The race costs about 3.5 s on a cold first load (time to first image 102 -> 106 s on Triton 3.7). It is cached per card and toolchain after that.
  • Kill switch: headks (UNSLOTH_DIFFUSION_INT8_CUTLASS=0) gives 10.53 s/image, 0 prebuilt calls, and images identical to base (8 of 8).

Bit-exactness in the product flow: every prebuilt-kernel output during a real FLUX.3 render was compared with the eager reference on the same inputs (I8_VERIFY): 750 of 750 calls, 0 mismatching elements, in each of two head processes. Studio's forced Triton kernel gave 598 checked calls, 0 mismatching elements.

Images are not bitwise reproducible across processes on this stack, even for the same arm: two head processes differ by LPIPS 0.0055 (max 0.011), and two base processes on torch 2.13 by 0.0061. So head vs base cannot be judged by image identity. Head vs base LPIPS (0.0057 on torch 2.13) is inside that A/A spread.

On torch 2.14.1, with four processes (two head, two with Studio's own Triton kernel forced on):

  • The two forced-Triton processes differ from each other by LPIPS 0.0066.
  • One head process and one Triton process came out at LPIPS 0.00001.
  • Every layer was bit-exact in every process.

The image-level drift is in the stack, not in either GEMM. On that stack the cuBLAS base was reproducible across processes (8 of 8 images identical), and so was the kill switch against it.

Kaggle T4, torch 2.11.0, FLUX.3 klein INT8, four base and four head processes interleaved:

  • base: 47.15 / 47.21 / 47.16 / 47.17 s/image.
  • head: 47.18 / 47.10 / 47.12 / 47.15 s/image.

No change. FLUX.3 on fp16-only cards loads into Studio's native W8A8 Linear. Its eager forward runs the compiled _w8a8_rows function, which keeps cuBLAS and lets Inductor fuse the epilogue into one pass. Against that path the microbench margin on Turing is about 4% of GEMM time, and the prebuilt kernel is not on it.

The prebuilt kernel takes the uncompiled _int_mm path:

  • CUDA graph capture;
  • hosts with no Inductor runtime (for example Windows without Triton), where the microbench shows 0.59x of the eager epilogue.

On T4 the probe, the race (551 launches, all bit-exact against the native reference) and the GPU unit tests pass. Images match base at the A/A level: LPIPS 0.00001 for both head vs base and base2 vs base.

Tests

  • tests/test_diffusion_int8_cutlass.py (CPU): family and switch gates, broken or missing library, ROCm, and the wheel found without importing it. It checks that the generic reference matches Studio's bf16 reference and the fp16 fused path's torchao epilogue bit for bit. It also covers op-body dispatch (winner, lost small-M race, failed launch dropping the plan), the per-card and per-bias plan keys, the race margin, and that the build generator and loader agree on ABI and dtype codes.
  • With UNSLOTH_DIFFUSION_INT8_CUTLASS_LIB set on a GPU: bit-exact launch per probed tile, and launch inside a CUDA graph.
  • Existing test_diffusion_int8_gemm*.py, test_diffusion_int8_fused.py and test_diffusion_fp16_card_int8.py: unchanged results.

Not covered here

  • Windows: the win_amd64 wheel build and a Windows GPU run did not run. The build steps follow the existing Windows CUDA jobs, and the library is plain C ABI with static runtimes.
  • The workflow itself (manylinux container build, signing, publish) has not run in CI. The same build.py / make_wheel.py built and loaded locally (glibc, no GPU) and built on Colab L4 / A100 and Kaggle T4 with nvcc 13.0 for the measured runs. The measured binaries were built on the VMs, not by the workflow.
  • sm86 (RTX 30) and sm87: no card in the pool. They run the sm_86 SASS, or the sm_80 SASS on sm87, behind the same probe and race. Not measured.
  • A100 end to end; Qwen-Image-2.1 and MiniMax-H3 end to end. Microbench only.
  • L4 deep-K shapes (K >= 9216 at large M; FLUX.3's own shapes all won): the prebuilt tiles trail the Triton kernel by up to 26%, so the race keeps Triton there. MiniMax-H3 on L4 with Triton 3.7 gets no gain.
  • T4 end to end: no gain (above). Wiring the kernel into the compiled native function is left for a follow-up.
  • Image identity across processes: not reproducible for the fused arms on these stacks (above). Bit-exactness is shown per layer in the product flow and per tile in the probe and microbench.
  • test_no_compiled_variant_spills_to_local_memory fails on the L4 GPU leg (torch 2.14.1, Triton 3.8.0). It forces the existing Triton kernel, which spills there (Prefetch on sm_8x makes fp8/int8 tl.dot loops spill registers instead of staying spill-free triton-lang/triton#12486). Not re-run on the base tree.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T12:51:29.227677Z e14a6c1 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61c9c84302

ℹ️ 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".

timeout-minutes: 60
run: |
set -euo pipefail
docker run --rm -v "$PWD:/w" -w /w quay.io/pypa/manylinux_2_28_x86_64 bash -euo pipefail -c '

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass CUTLASS_SHA into the Linux build container

In the Linux build step of prebuilt-int8-gemm.yml, CUTLASS_SHA exists in the runner environment but is not passed into the container. The single-quoted script expands $CUTLASS_SHA inside the container, where bash -u aborts with an unbound-variable error when packaging the wheel. Consequently, the Linux job cannot produce its artifact and the signing/publishing jobs remain blocked. Pass the variable explicitly; the Docker documentation describes --env as the option to “Set environment variables.”

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ab83eca: the container now gets the value with -e CUTLASS_SHA.

Comment on lines +145 to +146
cd "$RUNNER_TEMP"
"$py" - <<'EOF'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve the smoke-test interpreter before changing directories

On both platform jobs, py is a relative path to the virtual environment created in the checkout (smoke/bin/python or smoke/Scripts/python.exe). After changing to $RUNNER_TEMP, invoking "$py" searches beneath that different directory, so the smoke step fails before loading the library, preventing artifact upload and publication even if compilation succeeds. Store an absolute interpreter path before the directory change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ab83eca: the interpreter path is absolute ($PWD/smoke/...) before the cd.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ab83ecaf1a

ℹ️ 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 added a commit that referenced this pull request Nov 11, 2026
…unner can meet (#17488)

## Summary

`studio/backend/tests/test_llama_upstream_single_owner.py` fails
intermittently on CI under xdist on PRs that do not touch it (seen on
#17486):

```
tests/test_llama_upstream_single_owner.py:423: in _until
E   asyncio.exceptions.CancelledError
E   TimeoutError
3 failed, 14184 passed
```

Every failure is the test's `_until()` helper giving up. It polls a
predicate (the fake backend thread started, a task finished, the respawn
task list drained) and allowed 1 s. On a loaded 2-core runner with xdist
workers, the backend thread's next turn can come later than that, so the
wait expires while the code under test is still correct.

Reproduced locally on main by pinning the file's run to one CPU with 6
xdist workers (`taskset -c 0 ... -n 6`): 4 failed, 49 passed, twice, all
in `_until`.

## Change

`_until()` now caps its wait at 15 s (`_UNTIL_TIMEOUT_S`). It is only a
cap: the helper returns as soon as the predicate holds, so a passing run
is no slower and every assertion is unchanged. A real hang still fails,
just later.

## Testing

- Same single-CPU, 6-worker run with this change: 53 passed, twice.
- Unloaded: 53 passed in 8 s, as before.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2cd1fa10a

ℹ️ 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".

Comment on lines +694 to +695
if index in _CUT_PLAN:
return _CUT_PLAN[index]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Extend cached CUTLASS plans for newly loaded weight shapes

When a different INT8 transformer is loaded on the same GPU in the same Studio process, this early return reuses only the first transformer's shape plans and never examines the new recs. Neither model uninstall nor normal dispatch clears _CUT_PLAN, so any new weight shapes permanently miss CUTLASS acceleration for the remainder of the process; on CUTLASS-only cards they are excluded from the swap altogether. Reuse existing shape entries, but still plan and race shapes missing from the device's cached plan.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8a81f2f: the plan now keeps the shapes already planned on that card and plans only the new ones from a later load; a test covers a second load adding a shape.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 8a81f2ffdd

ℹ️ 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

Copy link
Copy Markdown
Member Author

Core zoo (HF=latest + TRL=latest) fails on this PR with a test that is skipped on every other PR:

tests/test_gdn_causal_conv1d_seq_idx.py:317: in test_hub_layer_passes_real_kernels_validation
    hub_fn = gcc._hub_gdn_function(kernels.use_kernel_forward_from_hub("causal_conv1d_fn"), _hub_conv)
E   AttributeError: module 'kernels' has no attribute 'use_kernel_forward_from_hub'

That job does not install the Hugging Face kernels package, so elsewhere the test skips:

SKIPPED [1] tests/test_gdn_causal_conv1d_seq_idx.py:316: could not import 'kernels': No module named 'kernels'

This PR adds a new top-level studio/kernels/ directory (int8_gemm/build.py, make_wheel.py, ...) with no __init__.py. With studio on sys.path and no real kernels installed, import kernels now finds that directory as a namespace package, so pytest.importorskip("kernels") no longer skips and the test gets the wrong module. Every published kernels release (0.17.3 through 0.18.2) does export use_kernel_forward_from_hub, so the package itself is fine.

Renaming the directory to a name that cannot collide with an importable package (for example studio/int8_gemm_kernels/) should clear it, and also keeps any runtime import kernels from picking up the build scripts.

… so they never import as the kernels package
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: e14a6c13d9

ℹ️ 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

Copy link
Copy Markdown
Member Author

Thanks, same diagnosis here. Fixed in e14a6c1: the sources moved to studio/native_kernels/int8_gemm, so import kernels no longer resolves to them with studio/ on PYTHONPATH, and a test fails if a studio/kernels folder comes back.

@danielhanchen
danielhanchen merged commit 52cea66 into main Nov 11, 2026
@danielhanchen
danielhanchen deleted the studio-int8-cutlass branch November 11, 2026 17:56
danielhanchen added a commit that referenced this pull request Nov 20, 2026
…8575)

#18441 routed T4 fp16 native W8A8 linears through the raced CUTLASS
GEMM. Building the activation codes already lets a CUDA OOM propagate,
but an OOM from `native_gemm` itself (its fp16 output is allocated
inside the call) was caught by the generic `except Exception` handler.
That handler cleared every `_NATIVE_PLAN` entry, for every device and
shape, and then ran `torch._int_mm`, whose int32 accumulator is larger
than the fp16 output that just failed to allocate. So an OOM at the GEMM
turned into a second, bigger allocation on a card that was already full,
and later forwards on unrelated layers and cards lost their tile plans.
The eager `_int_mm_from_q` path (#17486) had the same handler.

## Change

Both `native_gemm` call sites in `diffusion_native_quant.py` re-raise
`torch.cuda.OutOfMemoryError` before the generic handler, matching the
codes step. Every other kernel failure keeps the existing behaviour
(plan reset, stock `_int_mm` maths).

## Tests

Added to `tests/test_diffusion_native_quant_cutlass16.py`, CPU only,
with `native_gemm` stubbed:

- `test_cutlass16_gemm_oom_propagates_and_keeps_plans`: an OOM from the
GEMM reaches the caller, `torch._int_mm` is never called, and both plan
entries (this layer, plus another device and shape) are untouched. Fails
on main (OOM swallowed, `_int_mm` retried, plans cleared), passes here.
- `test_eager_native_gemm_oom_propagates_and_keeps_plans`: the same for
the eager `_int_mm_from_q` path. Fails on main, passes here.
- `test_cutlass16_gemm_fault_still_falls_back`: a non-OOM GEMM failure
still clears the plans and returns the `_int_mm` result. Passes on main
and here.

Suite (`tests/test_diffusion_native_quant*.py`,
`tests/test_diffusion_int8*.py`,
`tests/test_diffusion_native_w8a8*.py`): 1001 passed, 343 skipped, 4
failed on both main and this branch, with the same failing IDs
(`test_diffusion_int8_attention_toggle.py::test_request_models_carry_the_field_and_old_clients_send_nothing`
and three `test_diffusion_int8_fused.py::test_fused_flux_single_*`).
These failures were already there before this change.

## Not proven here

No GPU run. The tests stub the GEMM, so they don't show a real OOM on a
T4. That would take FLUX.3 klein INT8 on a T4 with `gpu_ballast.py`
holding memory so the CUTLASS output allocation fails: on main the step
should either hit a second OOM in `_int_mm` or recover with
`_NATIVE_PLAN` empty, and here the OOM should surface once with
`_NATIVE_PLAN` unchanged.
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