Skip to content

Commit 05c19d1

Browse files
andyanwangpytorchmergebot
authored andcommitted
[Inductor] Add back the revert part (#160054)
Add back the reverted code(#159809) as we've figured out the actual root cause of the internal test failures. Mote details in the internal diff. Rollback Plan: Differential Revision: D79776691 Pull Request resolved: #160054 Approved by: https://github.com/blaine-rister
1 parent d678674 commit 05c19d1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

torch/_dynamo/device_interface.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ def init_device_reg() -> None:
590590
for i in range(torch.xpu.device_count()):
591591
register_interface_for_device(f"xpu:{i}", XpuInterface)
592592

593+
register_interface_for_device("mtia", MtiaInterface)
594+
for i in range(torch.mtia.device_count()):
595+
register_interface_for_device(f"mtia:{i}", MtiaInterface)
596+
593597
register_interface_for_device("cpu", CpuInterface)
594598
register_interface_for_device("mps", MpsInterface)
595599

torch/utils/_triton.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def _return_true(device_interface: Any) -> bool:
135135
"cuda": cuda_extra_check,
136136
"xpu": _return_true,
137137
"cpu": cpu_extra_check,
138+
"mtia": _return_true,
138139
}
139140

140141
def is_device_compatible_with_triton() -> bool:

0 commit comments

Comments
 (0)