[ROCm][CI] Make ROCm 10.0 the default image; keep ROCm 7.2 as -rocm72 (#58761)
Signed-off-by: Rohan Potdar <rohan.potdar@amd.com> Signed-off-by: Rohan138 <rohanpotdar138@gmail.com> Signed-off-by: Micah Williamson <micah.williamson@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Micah Williamson <micah.williamson@amd.com> Co-authored-by: Kevin H. Luu <khluu000@gmail.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
Micah Williamson
Kevin H. Luu
Andreas Karatzas
parent
03ee2e134d
commit
b2456c622b
@@ -645,8 +645,10 @@ class precompiled_wheel_utils:
|
||||
|
||||
@staticmethod
|
||||
def rocm_version_to_variant(rocm_version: str) -> str:
|
||||
"""Convert a ROCm version string to a wheel variant, e.g. 7.2.3 -> rocm723."""
|
||||
return "rocm" + rocm_version.replace(".", "")
|
||||
"""Convert a ROCm version string to a wheel variant from its major and
|
||||
minor version, e.g. 7.2.3 -> rocm72, 10.0.0 -> rocm100.
|
||||
"""
|
||||
return "rocm" + "".join(rocm_version.split(".")[:2])
|
||||
|
||||
@staticmethod
|
||||
def detect_system_rocm_variant() -> str | None:
|
||||
@@ -1382,7 +1384,9 @@ def get_vllm_version() -> str:
|
||||
# Get the Rocm Version
|
||||
rocm_version = get_rocm_version() or torch.version.hip
|
||||
if rocm_version and rocm_version != envs.VLLM_MAIN_CUDA_VERSION:
|
||||
version += f"{sep}rocm{rocm_version.replace('.', '')[:3]}"
|
||||
version += sep + precompiled_wheel_utils.rocm_version_to_variant(
|
||||
rocm_version
|
||||
)
|
||||
elif _is_tpu():
|
||||
version += f"{sep}tpu"
|
||||
elif _is_cpu():
|
||||
@@ -1512,6 +1516,7 @@ def get_requirements() -> list[str]:
|
||||
requirements = _read_requirements("rocm.txt")
|
||||
if "develop" in sys.argv[1:] and "--no-deps" not in sys.argv[1:]:
|
||||
_check_requirements_preinstalled(requirements)
|
||||
requirements += get_rocm_device_requirements()
|
||||
elif _is_tpu():
|
||||
requirements = _read_requirements("tpu.txt")
|
||||
elif _is_cpu():
|
||||
@@ -1523,6 +1528,24 @@ def get_requirements() -> list[str]:
|
||||
return requirements
|
||||
|
||||
|
||||
def get_rocm_device_requirements() -> list[str]:
|
||||
"""GPU kernel packages for TheRock builds.
|
||||
|
||||
TheRock ships GPU kernels as separate per-arch wheels selected through
|
||||
``[device-<arch>]`` extras on torch, torchvision and rocm. Require them for
|
||||
every arch this wheel was compiled for, so ``pip install vllm`` works on
|
||||
any supported GPU.
|
||||
"""
|
||||
if not _is_hip() or importlib.util.find_spec("rocm_sdk") is None:
|
||||
return []
|
||||
arches = [a for a in os.getenv("PYTORCH_ROCM_ARCH", "").split(";") if a]
|
||||
return [
|
||||
f"{pkg}[device-{arch}]"
|
||||
for pkg in ("torch", "torchvision", "rocm")
|
||||
for arch in arches
|
||||
]
|
||||
|
||||
|
||||
ext_modules = []
|
||||
|
||||
if _is_cuda() or _is_hip():
|
||||
|
||||
Reference in New Issue
Block a user