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

11 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2026-03-13 10:08 +0800

1import logging 

2 

3import triton 

4 

5from ..utils.pointwise_dynamic import pointwise_dynamic 

6 

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

8 

9 

10@pointwise_dynamic(promotion_methods=[(0, 1, "DEFAULT")]) 

11@triton.jit 

12def bitwise_right_shift_kernel(a, b): 

13 return a >> b 

14 

15 

16def bitwise_right_shift(self, other, *, out=None): 

17 logger.debug("GEMS_CAMBRICON BITWISE_RIGHT_SHIFT") 

18 return bitwise_right_shift_kernel(self, other, out=out)