Skip to content

Commit 4de7146

Browse files
authored
[V0 deprecation] Remove V0 HPU backend (#21131)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
1 parent ac9fb73 commit 4de7146

File tree

27 files changed

+10
-3926
lines changed

27 files changed

+10
-3926
lines changed

docker/Dockerfile.hpu

Lines changed: 0 additions & 21 deletions
This file was deleted.

requirements/hpu.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

setup.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -410,37 +410,14 @@ def run(self) -> None:
410410
package_data[package_name].append(file_name)
411411

412412

413-
def _is_hpu() -> bool:
414-
# if VLLM_TARGET_DEVICE env var was set explicitly, skip HPU autodetection
415-
if os.getenv("VLLM_TARGET_DEVICE", None) == VLLM_TARGET_DEVICE:
416-
return VLLM_TARGET_DEVICE == "hpu"
417-
418-
# if VLLM_TARGET_DEVICE was not set explicitly, check if hl-smi succeeds,
419-
# and if it doesn't, check if habanalabs driver is loaded
420-
is_hpu_available = False
421-
try:
422-
out = subprocess.run(["hl-smi"], capture_output=True, check=True)
423-
is_hpu_available = out.returncode == 0
424-
except (FileNotFoundError, PermissionError, subprocess.CalledProcessError):
425-
if sys.platform.startswith("linux"):
426-
try:
427-
output = subprocess.check_output(
428-
'lsmod | grep habanalabs | wc -l', shell=True)
429-
is_hpu_available = int(output) > 0
430-
except (ValueError, FileNotFoundError, PermissionError,
431-
subprocess.CalledProcessError):
432-
pass
433-
return is_hpu_available
434-
435-
436413
def _no_device() -> bool:
437414
return VLLM_TARGET_DEVICE == "empty"
438415

439416

440417
def _is_cuda() -> bool:
441418
has_cuda = torch.version.cuda is not None
442419
return (VLLM_TARGET_DEVICE == "cuda" and has_cuda
443-
and not (_is_neuron() or _is_tpu() or _is_hpu()))
420+
and not (_is_neuron() or _is_tpu()))
444421

445422

446423
def _is_hip() -> bool:
@@ -573,12 +550,6 @@ def get_vllm_version() -> str:
573550
if neuron_version != MAIN_CUDA_VERSION:
574551
neuron_version_str = neuron_version.replace(".", "")[:3]
575552
version += f"{sep}neuron{neuron_version_str}"
576-
elif _is_hpu():
577-
# Get the Intel Gaudi Software Suite version
578-
gaudi_sw_version = str(get_gaudi_sw_version())
579-
if gaudi_sw_version != MAIN_CUDA_VERSION:
580-
gaudi_sw_version = gaudi_sw_version.replace(".", "")[:3]
581-
version += f"{sep}gaudi{gaudi_sw_version}"
582553
elif _is_tpu():
583554
version += f"{sep}tpu"
584555
elif _is_cpu():
@@ -625,8 +596,6 @@ def _read_requirements(filename: str) -> list[str]:
625596
requirements = _read_requirements("rocm.txt")
626597
elif _is_neuron():
627598
requirements = _read_requirements("neuron.txt")
628-
elif _is_hpu():
629-
requirements = _read_requirements("hpu.txt")
630599
elif _is_tpu():
631600
requirements = _read_requirements("tpu.txt")
632601
elif _is_cpu():
@@ -635,8 +604,7 @@ def _read_requirements(filename: str) -> list[str]:
635604
requirements = _read_requirements("xpu.txt")
636605
else:
637606
raise ValueError(
638-
"Unsupported platform, please use CUDA, ROCm, Neuron, HPU, "
639-
"or CPU.")
607+
"Unsupported platform, please use CUDA, ROCm, Neuron, or CPU.")
640608
return requirements
641609

642610

vllm/_custom_ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
logger = init_logger(__name__)
1515

16-
if not current_platform.is_tpu() and not current_platform.is_hpu()\
17-
and not current_platform.is_xpu():
16+
if not current_platform.is_tpu() and not current_platform.is_xpu():
1817
try:
1918
import vllm._C
2019
except ImportError as e:

0 commit comments

Comments
 (0)