intel / torch-xpu-ops

Apache License 2.0
30 stars 21 forks source link

Add 4 Bessel Special Operators #968

Closed Kanya-Mo closed 1 month ago

Kanya-Mo commented 1 month ago
xytintel commented 1 month ago

aten/src/ATen/native/Math.h can be reused for bessel_j1_forward and bessel_y1_forward.

Kanya-Mo commented 1 month ago

aten/src/ATen/native/Math.h can be reused for bessel_j1_forward and bessel_y1_forward.

Hi @xytintel, the implementation of bessel_j1_forward and bessel_y1_forward in aten/src/ATen/native/Math.h include recursive call for some input which is not supported by sycl (compilation will fail with a message 'SYCL kernel cannot call a recursive function"), so I upstreamed their ipex implementation. On the other hand, torch's bessel_j0_forward and bessel_y0_forward are fine and that's why I didn't include them in MathExtension.h.