From fe5438200b1cd5e496cf50f095d208eb1fb18fdd Mon Sep 17 00:00:00 2001 From: Charlie Fu Date: Fri, 6 Feb 2026 13:09:59 -0600 Subject: [PATCH] [Rocm][Bugfix] Fix dtype not same for gemm_a4w4 op (#33734) Signed-off-by: charlifu --- .../layers/quantization/quark/schemes/quark_ocp_mx.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py b/vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py index 9c0ce972316..c5f50122eb7 100644 --- a/vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py +++ b/vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py @@ -118,7 +118,12 @@ try: ) gemm_a4w4( - x_q, weight, x_s, weight_scale.view(x_s.dtype), y, bpreshuffle=True + x_q, + weight.view(x_q.dtype), + x_s, + weight_scale.view(x_s.dtype), + y, + bpreshuffle=True, ) return y[:M] else: