Skip to content

Commit

Permalink
format.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kzawora-intel committed Aug 13, 2024
1 parent db4c30f commit 08c9cf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions vllm/distributed/device_communicators/hpu_communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
from vllm.platforms import current_platform
from vllm.utils import is_fake_hpu

if current_platform.is_hpu():
if not is_fake_hpu():
import habana_frameworks.torch as htorch # noqa: F401
if current_platform.is_hpu() and not is_fake_hpu():
import habana_frameworks.torch as htorch # noqa: F401


class HpuCommunicator:
Expand Down
2 changes: 1 addition & 1 deletion vllm/executor/ray_habana_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _init_workers_ray(self, placement_group: "PlacementGroup",
worker_wrapper_kwargs = self._get_worker_wrapper_args()
for bundle_id, bundle in enumerate(placement_group.bundle_specs):
resource_name = "HPU" if not is_fake_hpu() else "CPU"
if not bundle.get(resource_name,0):
if not bundle.get(resource_name, 0):
continue
scheduling_strategy = PlacementGroupSchedulingStrategy(
placement_group=placement_group,
Expand Down

0 comments on commit 08c9cf3

Please sign in to comment.