There was an error while loading. Please reload this page.
1 parent 4be17e6 commit 4742f57Copy full SHA for 4742f57
1 file changed
src/flag_gems/runtime/backend/_kunlunxin/ops/rsqrt.py
@@ -2,6 +2,7 @@
2
3
import triton
4
import triton.language as tl
5
+import triton.language.extra.xpu.libdevice as xpu
6
7
from ..utils.pointwise_dynamic import pointwise_dynamic
8
@@ -11,7 +12,7 @@
11
12
@pointwise_dynamic(promotion_methods=[(0, "INT_TO_FLOAT")])
13
@triton.jit
14
def rsqrt_func(x):
- return 1.0 / tl.sqrt(x.to(tl.float32))
15
+ return xpu.rsqrt(x.to(tl.float32))
16
17
18
def rsqrt(A):
0 commit comments