[aoti] Initial Metal support (#153959)

An example generated file: P1816629015

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153959
Approved by: https://github.com/malfet, https://github.com/desertfire
ghstack dependencies: #153964
This commit is contained in:
angelayi
2025-05-22 17:01:22 -07:00
committed by PyTorch MergeBot
parent b33b7d5c8c
commit 26471fc203
11 changed files with 165 additions and 17 deletions

View File

@ -2475,7 +2475,7 @@ def is_gpu(device: Optional[str]) -> bool:
def device_need_guard(device: str) -> bool:
return is_gpu(device)
return device != "mps" and is_gpu(device) # TODO: MPS does not expose streams now
def needs_fallback_due_to_atomic_add_limitations(dtype: torch.dtype) -> bool: