Skip to content

Commit ecaeb91

Browse files
Remove dtype.float16 support for hpu config (#1657)
Remove dtype.float16 support for hpu config
1 parent 927a754 commit ecaeb91

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vllm/platforms/hpu.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ class HpuPlatform(Platform):
3535
"bitsandbytes"
3636
]
3737

38+
@property
39+
def supported_dtypes(self) -> list[torch.dtype]:
40+
"""Returns the supported dtypes for the current platform."""
41+
# Be careful with the order of the dtypes. The first dtype will
42+
# be used as the default dtype fallback for the current platform,
43+
# when encountering unsupported dtypes in "auto" dtype.
44+
return [torch.bfloat16, torch.float32]
45+
3846
@classmethod
3947
def get_attn_backend_cls(cls, selected_backend: _Backend, head_size: int,
4048
dtype: torch.dtype, kv_cache_dtype: Optional[str],

0 commit comments

Comments
 (0)