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

Supporting custom backend for all accelerator. #5298

Closed
wants to merge 2 commits into from

Conversation

umchand
Copy link

@umchand umchand commented Mar 19, 2024

No description provided.

@@ -14,6 +14,7 @@ class OffloadDeviceEnum(str, Enum):
none = "none"
cpu = "cpu"
nvme = "nvme"
hpu = "hpu"
Copy link
Contributor

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.

Suggested change
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):
Copy link
Contributor

@tjruwase tjruwase Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. compile_backend is a more apt name since it refers to compilation backend.
  2. Compile backend should be global rather than per device.
Suggested change
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])
Copy link
Contributor

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.

@tjruwase tjruwase requested review from mrwyattii and tohtana and removed request for mrwyattii March 19, 2024 13:26
@tjruwase
Copy link
Contributor

@umchand, I think we can close this because of #5299. Please take a look and share comments/questions.

@umchand umchand closed this Mar 19, 2024
@umchand umchand deleted the umchand/accelerator_abstraction branch March 19, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants