Coverage for src/flag_gems/ops/log10.py: 94%
18 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-06-04 09:03 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-06-04 09:03 +0800
1import logging
3import triton
4import triton.language as tl
6from flag_gems.utils import pointwise_dynamic
8logger = logging.getLogger(__name__)
11@pointwise_dynamic(promotion_methods=[(0, "INT_TO_FLOAT")])
12@triton.jit
13def log10_func(x):
14 return tl.log(x.to(tl.float32)) * 0.4342944819032518
17def log10(A):
18 logger.debug("GEMS LOG10")
19 return log10_func(A)
22def log10_(A):
23 logger.debug("GEMS LOG10_")
24 return log10_func(A, out0=A)
27def log10_out(A, out):
28 logger.debug("GEMS LOG10_OUT")
29 return log10_func(A, out0=out)