Skip to content

test(kernels): classify the portable CPU readers in the fusion inventory (#4599, #4736) - #4774

Merged
Qubitium merged 1 commit into
mainfrom
fix/kernel-fusion-inventory
Nov 17, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/kernel-fusion-inventory

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Fixes the kernel-inventory gap left by #4753 (and the pre-existing one from #4599).

Problem

tests/module_tree/test_fusion_kernel_backends.py::test_every_registered_gptq_awq_kernel_has_an_explicit_fusion_contract
is red on main:

AssertionError: AwqGEMVTorchLinear

Every registered GPTQ/AWQ kernel must be either admitted by the fusion executor
(kernel_specs()) or listed in EXCLUDED with a reason. The portable CPU
readers added in #4599 (AwqGEMVTorchLinear) and #4753
(AwqGEMVFastTorchLinear, LLMAwqTorchLinear) are in neither.

While reviewing #4753 I also found that its two new AOT_EAGER declarations
were not pinned by a measured case, which #4737 makes the convention for every
kernel.

Changes

  • tests/module_tree/test_fusion_kernel_backends.py: add the three CPU-only
    portable readers to EXCLUDED. They dequantize to a dense tile per forward,
    so no fused executor group can consume their packed storage.
  • tests/kernels/test_kernel_compile_levels_awq.py: add CPU cases for
    AwqGEMVFastTorchLinear and LLMAwqTorchLinear. Both measure
    eager + dynamo + aot_eager, matching the declared AOT_EAGER
    (inductor/cudagraph are device-only skips; capture is not claimed).

No runtime code change.

Tests

  • Red on unmodified main (a55bca3ac): the fusion assertion above.
  • Green with the change: tests/module_tree/test_fusion_kernel_backends.py +
    tests/kernels/test_kernel_compile_levels_awq.py +
    tests/kernels/test_kernel_compile_protocol.py -> 87 passed, 271 skipped
    (Linux aarch64, CPU-only; the CUDA cases are skipped without a device).
  • The two new level cases pass and measure AOT_EAGER on CPU.
  • ruff check clean.

…4736)

The two new readers are registered kernels, so the fusion inventory must
account for them, and #4737's convention is that each compile-level
declaration is pinned by a measured case in the per-family matrix.

- tests/module_tree/test_fusion_kernel_backends.py: add the three CPU-only
  portable readers (GEMV #4554, GEMV_FAST and LLM_AWQ #4736) to EXCLUDED with
  the reason they have no fused executor adapter. The test fails on this
  branch without the entry.
- tests/kernels/test_kernel_compile_levels_awq.py: add CPU cases for the two
  new readers. Both measure eager + dynamo + aot_eager, matching the declared
  AOT_EAGER; inductor/cudagraph are device-only skips and capture is not
  claimed.

No runtime code change.
@Qubitium
Qubitium merged commit ab151fe into main Nov 17, 2026
8 checks passed
@Qubitium
Qubitium deleted the fix/kernel-fusion-inventory branch November 17, 2026 14:35
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