pytorch/c10/metal
Nikita Shulga 624d94bdb8 [MPS] Extend torch.special.sinc to complex (#146648)
And to integral data types as well

Was too lazy to deduce the formula myself(or write a sympy script), but ChatGPT did a decent job of doing it, though it forgot that input must be multiplied by $$\pi$$:
```math
\text{Re}\left(\text{sinc}(x + i y)\right) = \frac{\sin(x)\cosh(y) x - \cos(x)\sinh(y) y}{x^2 + y^2}
```
```math
\text{Im}\left(\text{sinc}(x + i y)\right) = \frac{\cos(x)\sinh(y) x + \sin(x)\cosh(y) y}{x^2 + y^2}
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146648
Approved by: https://github.com/dcci
2025-02-07 01:12:37 +00:00
..
random.h [MPSInductor] Add rand support (#145705) 2025-01-27 06:07:36 +00:00
reduction_utils.h [BE][Metal] Fix signed unsigned comparison warning (#146549) 2025-02-06 00:40:17 +00:00
special_math.h [MPS] Extend torch.special.sinc to complex (#146648) 2025-02-07 01:12:37 +00:00
utils.h [METAL] inline bfloat min/max (#146588) 2025-02-06 17:57:31 +00:00