Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix INC FP8 inference after rebase #333

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vllm/model_executor/model_loader/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def device_loading_context(module: torch.nn.Module,

# Store original device states and move parameters to GPU if they're on CPU
for name, p in module.named_parameters():
if p.device.type == "cpu":
if p.device.type == "cpu" and target_device.type != 'hpu':
original_device_states[name] = p.device
p.data = p.data.to(target_device)
# Parameters already on target device are not touched
Expand Down
9 changes: 1 addition & 8 deletions vllm/platforms/hpu.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
from typing import Optional

import torch

from .interface import DeviceCapability, Platform, PlatformEnum
from .interface import Platform, PlatformEnum


class HpuPlatform(Platform):
_enum = PlatformEnum.HPU

@staticmethod
def get_device_capability(
device_id: int = 0) -> Optional[DeviceCapability]:
raise RuntimeError("HPU does not have device capability.")

@staticmethod
def inference_mode():
return torch.no_grad()
Loading