[Feature, Hardware] Enable SGLang on AMD GPUs via PyTorch for ROCm (#1420)

This commit is contained in:
HAI
2024-09-17 00:43:52 -07:00
committed by GitHub
parent 2fa5cec775
commit 3a6e04185b
11 changed files with 104 additions and 24 deletions

View File

@@ -51,6 +51,11 @@ show_time_cost = False
time_infos = {}
# torch flag AMD GPU
def is_hip() -> bool:
return torch.version.hip is not None
def enable_show_time_cost():
global show_time_cost
show_time_cost = True