Coverage for src/flag_gems/ops/gt.py: 89%
19 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-15 02:11 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-15 02:11 +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, 1, "ALWAYS_BOOL")])
12@triton.jit
13def gt_func(x, y):
14 return x.to(tl.float32) > y
17def gt(A, B):
18 logger.debug("GEMS GT")
19 return gt_func(A, B)
22@pointwise_dynamic(is_tensor=[True, False], promotion_methods=[(0, 1, "ALWAYS_BOOL")])
23@triton.jit
24def gt_func_scalar(x, y):
25 return x.to(tl.float32) > y
28def gt_scalar(A, B):
29 logger.debug("GEMS GT SCALAR")
30 return gt_func_scalar(A, B)