[ROCm][Perf] Use wvSplitK for single-output GEMMs (#53283)

Signed-off-by: tangzzycc <3081129260@qq.com>
This commit is contained in:
00CC
2026-09-23 06:38:17 +00:00
committed by GitHub
parent b33c8a657d
commit eb2e91d3ba
2 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ def rocm_unquantized_gemm_impl(
# The skinny kernels assume contiguous K elements. A shape-preserving
# reshape can retain a transposed activation's non-contiguous strides.
x_view = x.reshape(-1, x.size(-1)).contiguous()
if m > 8 and 0 < n <= 5:
if (m == 1 or m > 8) and 0 < n <= 5:
cu_count = num_compute_units()
out = ops.wvSplitK(weight, x_view, cu_count, bias)
return out.reshape(*x.shape[:-1], weight.shape[0])