[ROCm] [CI] Add ROCm Dockerfile and AMD CI (vllm v0.12.0) (#280)

Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Co-authored-by: Hongxia Yang <hongxia.yang@amd.com>
This commit is contained in:
TJianandHongxia Yang authored and GitHub committed 2025-12-21 11:51:37 +08:00
1 parent 85bc8bfa6a
commit 13584fd98e
19 files changed
+948 -14

No files matched your search

+8 -2
View File
@@ -3,7 +3,7 @@ from typing import Any
import torch.nn as nn
from vllm_omni.utils.platform_utils import detect_device_type
from vllm_omni.utils.platform_utils import detect_device_type, is_rocm
class CustomOp(nn.Module):
@@ -18,7 +18,9 @@ class CustomOp(nn.Module):
self._forward_method = self.dispatch_forward()
def dispatch_forward(self) -> Callable:
if self.is_cuda:
if is_rocm():
return self.forward_hip
elif self.is_cuda:
return self.forward_cuda
else:
return self.forward_native
@@ -36,3 +38,7 @@ class CustomOp(nn.Module):
def forward_cuda(self, *args, **kwargs):
raise NotImplementedError
def forward_hip(self, *args, **kwargs):
# By default, we assume that HIP ops are compatible with CUDA ops.
return self.forward_cuda(*args, **kwargs)