Fix quantization issues

This commit is contained in:
Jaret Burkett
2026-08-28 10:48:34 -06:00
parent 85a6880643
commit 92df289931
7 changed files with 470 additions and 19 deletions

View File

@@ -1319,6 +1319,19 @@ class ConvRotInt8Quantizer(OstrisQuantizer):
f"(needs in divisible by 16, out by 8, and a power-of-4 block >= 16)"
)
return False
if d < 128 and module.out_features % 16 != 0:
# cublasLt has no int8 kernel for K < 128 with N % 16 != 0
# (torch._int_mm raises CUBLAS_STATUS_NOT_SUPPORTED), e.g.
# omnigen2's 64 -> 2520 x_embedder
key = (d, module.out_features)
if key not in _skip_warned:
_skip_warned.add(key)
print_acc(
f"ConvRot: skipping linears with in_features={d}, "
f"out_features={module.out_features} (int8 gemm needs out "
f"divisible by 16 when in < 128)"
)
return False
return True
def quantize_(self, module: torch.nn.Linear, weight_fp32: torch.Tensor) -> None: