Skip to content

[BUG] AwqMacheteLinear declares group_size=32, which the native Machete kernel can't run; AUTO ranks it first for AWQ gs=32 #4218

Closed

Description

@Qubitium

Severity: medium–high on Hopper (every AUTO-loaded AWQ gs=32 model fails at the first forward)
Status: likely. Selection reproduced with the runtime availability mocked; the native refusal is from source (no SM90 to run on).
Version: 7.11.0 @ 9dad249

Summary

  • nn_modules/qlinear/machete_awq.py:87 sets SUPPORTS_GROUP_SIZE = [-1, 32, 64, 128], and validate has no group check.
  • Natively, machete_mainloop.cuh:~647 (can_implement) requires group_size % TileShapeK(64) == 0, enforced by TORCH_CHECK in machete_mm_launcher.cuh:~63.
  • The GPTQ variant already gets this right: machete.py:54 sets [-1, 64, 128] and also filters through query_machete_supported_group_sizes().
  • AwqMachete priority (100) is above AwqMarlin (90).

Reproduce (selection)

import torch
import gptqmodel.nn_modules.qlinear.machete_awq as MA
from gptqmodel.utils.importer import select_quant_linear, clear_validation_cache
from gptqmodel.quantization import FORMAT, METHOD
from gptqmodel.models._const import DEVICE
MA.machete_extension_available = lambda: True                 # simulate an SM90 host
MA._validate_machete_device_support = lambda d=None: True
MA.AwqMacheteLinear.cached_validate_once.cache_clear(); clear_validation_cache()
print([c.__name__ for c in select_quant_linear(bits=4, group_size=32, desc_act=False, sym=False, device=DEVICE.CUDA,
      format=FORMAT.GEMM, quant_method=METHOD.AWQ, pack_dtype=torch.int32, dtype=torch.float16, multi_select=True)])
# ['AwqMacheteLinear', 'AwqMarlinLinear', ...]

Expected

Remove 32 from SUPPORTS_GROUP_SIZE (or filter it via query_machete_supported_group_sizes() as MacheteLinear does), so AUTO falls through to AwqMarlin.


Found during an AI-assisted review (Claude Code) of 9dad249; repros were run on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions