Coverage for src/flag_gems/runtime/backend/_cambricon/ops/logical_not.py: 0%

12 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2026-03-25 02:48 +0800

1import logging 

2 

3import triton 

4import triton.language as tl 

5 

6from ..utils.pointwise_dynamic import pointwise_dynamic 

7 

8logger = logging.getLogger("flag_gems").getChild(__name__.lstrip(".")) 

9 

10 

11@pointwise_dynamic(promotion_methods=[(0, "ALWAYS_BOOL")]) 

12@triton.jit 

13def logical_not_func(x): 

14 return not x.to(tl.int1) 

15 

16 

17def logical_not(A): 

18 logger.debug("GEMS_CAMBRICON LOGICAL_NOT") 

19 return logical_not_func(A)