Coverage for src/flag_gems/runtime/backend/_kunlunxin/ops/acos.py: 0%
15 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-22 16:54 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-22 16:54 +0800
1import logging
3import triton
4import triton.language as tl
6from flag_gems.utils import tl_extra_shim
8from ..utils.pointwise_dynamic import pointwise_dynamic
10logger = logging.getLogger("flag_gems").getChild(__name__.lstrip("."))
13_acos = tl_extra_shim.acos
16@pointwise_dynamic(promotion_methods=[(0, "INT_TO_FLOAT")])
17@triton.jit()
18def acos_kernel(x):
19 # TODO: use flag_gems.utils.tl_extra_shim help apis
20 return _acos(x.to(tl.float32))
23def acos(x):
24 logger.debug("GEMS ACOS FORWARD")
25 y = acos_kernel(x)
26 return y