Coverage for src/flag_gems/runtime/backend/_cambricon/ops/logical_xor.py: 0%
12 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-13 10:08 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-13 10:08 +0800
1import logging
3import triton
4import triton.language as tl
6from ..utils.pointwise_dynamic import pointwise_dynamic
8logger = logging.getLogger("flag_gems").getChild(__name__.lstrip("."))
11@pointwise_dynamic(promotion_methods=[(0, 1, "ALWAYS_BOOL")])
12@triton.jit
13def logical_xor_func(x, y):
14 return x.to(tl.int1) ^ y.to(tl.int1)
17def logical_xor(A, B):
18 logger.debug("GEMS_CAMBRICON LOGICAL_XOR")
19 return logical_xor_func(A, B)