[mps/inductor] Add support for log(). (#144169)

Tested via:

```
 % pytest test/inductor/test_mps_basic.py
 ```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/144169
Approved by: https://github.com/jansel, https://github.com/malfet
This commit is contained in:
Davide Italiano
2025-01-04 03:07:56 +00:00
committed by PyTorch MergeBot
parent 087c625261
commit 479d6f2199
2 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,10 @@ class MetalOverrides(OpOverrides):
def isinf(x: CSEVariable) -> str:
return f"metal::isinf({x})"
@staticmethod
def log(x: CSEVariable) -> str:
return f"metal::log({x})"
@staticmethod
def abs(x: CSEVariable) -> str:
return f"metal::abs({x})"