I’m trying to write something as follows using IR builder:
with ib.for_range(0, size - 1, name = “level”, for_type = “unroll”) as level:
with ib.if_scope(tid % 2 == (1 & level)):
with ib.if_scope((~(is_descend ^ (p_data_new[tid] < p_data_new[tid + 1])))):
…
But TVM gives me errors as follows:
TypeError: unsupported operand type(s) for &: ‘int’ and ‘Var’
TypeError: unsupported operand type(s) for ^: ‘bool’ and ‘LT’
What’s the correct way of using bitwise operators here?