From bc39baa482dcfefeae6289e80cea63b4adc9beeb Mon Sep 17 00:00:00 2001 From: hlin99 <73271530+hlin99@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:19:05 +0800 Subject: [PATCH] fix bug: device_str in initialize_ray_cluster requires uppercase string (#297) fix bug: device_str in initialize_ray_cluster requires uppercase string w/o the bug fix, multi HPUs will encounter "ValueError: The number of required hpus exceeds the total number of available hpus in the placement group" error, as the device_str is not expected as uppercase, then available hpus always returns 0. --- vllm/executor/ray_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/executor/ray_utils.py b/vllm/executor/ray_utils.py index 8f5bc30a9599c..ea81c313f2da9 100644 --- a/vllm/executor/ray_utils.py +++ b/vllm/executor/ray_utils.py @@ -98,7 +98,7 @@ def initialize_ray_cluster( if is_tpu(): device_str = "TPU" elif is_hpu(): - device_str = hpu_device_string() + device_str = hpu_device_string().upper() # Create placement group for worker processes current_placement_group = ray.util.get_current_placement_group() if current_placement_group: