[ZenCPU] AMD Zen CPU Backend with supported dtypes via zentorch weekly (#39967)
Signed-off-by: Chinmay Kulkarni <Chinmay.Kulkarni@amd.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import torch
|
||||
|
||||
from vllm.logger import init_logger
|
||||
from vllm.platforms.cpu import CpuPlatform
|
||||
|
||||
@@ -22,3 +24,9 @@ class ZenCpuPlatform(CpuPlatform):
|
||||
def is_zen_cpu(self) -> bool:
|
||||
# is_cpu() also returns True for this platform (inherited from CpuPlatform).
|
||||
return True
|
||||
|
||||
# Currently, AMD CPUs do not support float16 compute.
|
||||
# Hence explicitly return bfloat16 and float32.
|
||||
@property
|
||||
def supported_dtypes(self) -> list[torch.dtype]:
|
||||
return [torch.bfloat16, torch.float32]
|
||||
|
||||
Reference in New Issue
Block a user