Coverage for src/flag_gems/runtime/backend/_cambricon/ops/bitwise_not.py: 0%
15 statements
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-11 02:28 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2026-03-11 02:28 +0800
1import logging
3import triton
5from ..utils.pointwise_dynamic import pointwise_dynamic
7logger = logging.getLogger("flag_gems").getChild(__name__.lstrip("."))
10@pointwise_dynamic(is_tensor=[True, False], promotion_methods=[(0, "DEFAULT")])
11@triton.jit
12def bitwise_not_func(x, inplace):
13 return ~x
16def bitwise_not(A):
17 logger.debug("GEMS_CAMBRICON BITWISE NOT")
18 return bitwise_not_func(A, False)
21def bitwise_not_(A):
22 logger.debug("GEMS_CAMBRICON BITWISE NOT_")
23 bitwise_not_func(A, True, out0=A)
24 return A