Skip to content

Commit

Permalink
Update the Triton DeviceInterface in test/inductor/extension_backends…
Browse files Browse the repository at this point in the history
…/triton/device_interface.py (pytorch#144399)

Following the changes to how `DeviceInterface` is used in this [PR](pytorch#142033), the `DeviceInterface` in `extension_backend/triton/device_interface.py` should by updated to return the `DeviceProperties` instead of raising a NotImplementedError.

This PR mirrors the [changes](https://github.com/pytorch/pytorch/pull/142033/files#diff-06553e25e48e1d60f3030458bc46d52067d3d0c3eef2d5fcea29f7e8126bd7c9L112-R114) made in Dynamo when the PR landed.

Pull Request resolved: pytorch#144399
Approved by: https://github.com/jansel
  • Loading branch information
GeorgeWigley authored and pytorchmergebot committed Jan 13, 2025
1 parent bee84e8 commit fe8c5c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/inductor/extension_backends/triton/device_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def get_raw_stream(device_index: int):
def synchronize(device) -> None:
pass

@staticmethod
def get_device_properties(device) -> DeviceProperties:
raise NotImplementedError
@classmethod
def get_device_properties(cls, device=None) -> DeviceProperties:
return cls.Worker.get_device_properties(device)

# Can be mock patched by @patch decorator.
@staticmethod
Expand Down

0 comments on commit fe8c5c7

Please sign in to comment.