mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[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:
committed by
PyTorch MergeBot
parent
918ae5d361
commit
28bcd9eb30
@ -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:
|
||||
|
Reference in New Issue
Block a user