-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Supporting custom backend for all accelerator. #5298
Conversation
@@ -14,6 +14,7 @@ class OffloadDeviceEnum(str, Enum): | |||
none = "none" | |||
cpu = "cpu" | |||
nvme = "nvme" | |||
hpu = "hpu" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hpu
is not a memory target for offloading.
hpu = "hpu" |
@@ -287,3 +287,7 @@ def build_extension(self): | |||
@abc.abstractmethod | |||
def export_envs(self): | |||
... | |||
|
|||
@abc.abstractmethod | |||
def get_accelerator_backend(self, device_index=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compile_backend
is a more apt name since it refers to compilation backend.- Compile backend should be global rather than per device.
def get_accelerator_backend(self, device_index=None): | |
def get_compile_backend(self): |
@pytest.mark.parametrize('offload_device', [OffloadDeviceEnum.none, OffloadDeviceEnum.cpu, OffloadDeviceEnum.nvme]) | ||
@pytest.mark.parametrize( | ||
'offload_device', | ||
[OffloadDeviceEnum.none, OffloadDeviceEnum.cpu, OffloadDeviceEnum.nvme, OffloadDeviceEnum.hpu]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hpu
is not an offload device.
No description provided.