Coverage for src/flag_gems/runtime/backend/_cambricon/ops/acos.py: 0%
15 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-18 02:36 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-18 02:36 +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
10_acos = tl_extra_shim.acos
11logger = logging.getLogger("flag_gems").getChild(__name__.lstrip("."))
14@pointwise_dynamic(promotion_methods=[(0, "INT_TO_FLOAT")])
15@triton.jit()
16def acos_kernel(x):
17 # TODO: use flag_gems.utils.tl_extra_shim help apis
18 return _acos(x.to(tl.float32))
21def acos(x):
22 logger.debug("GEMS_CAMBRICON ACOS FORWARD")
23 y = acos_kernel(x)
24 return y