[ROCm] [CI] Fix cpu test on rocm (#6267)
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
This commit is contained in:
1 parent
2a9f6aaa8e
commit
170d498771
1 file changed
+5
@@ -203,6 +203,11 @@ def _apply_unquantized_gemm_with_weight(
|
||||
weight: torch.Tensor,
|
||||
bias: torch.Tensor | None,
|
||||
) -> torch.Tensor:
|
||||
# GEMM dispatch is selected from the host platform, not the tensor device.
|
||||
# In CPU tests on a ROCm host that selects rocm_unquantized_gemm, which has
|
||||
# no CPU kernel. Keep that combination on PyTorch's portable implementation.
|
||||
if current_platform.is_rocm() and input_.device.type == "cpu":
|
||||
return F.linear(input_, weight, bias)
|
||||
if envs.VLLM_BATCH_INVARIANT and current_platform.is_cuda_alike():
|
||||
return linear_batch_invariant(input_, weight, bias)
|
||||
return dispatch_unquantized_gemm()(layer, input_, weight, bias)
|
||||
|
||||
Reference in new issue
Block a user