Hi, I’m using the ir_builder to contrust a cuda kernel, but I encounter a problem of if_scope
ib = tvm.tir.ir_builder.create()
n = te.size_var("n")
A = ib.pointer("float32", name="A")
tmod = tvm.tir.truncmod
with ib.for_range(0, n, name="i") as i:
with ib.if_scope(tmod(i, 2) == 0):
A[i] = A[i] + 1
b = 100
with ib.else_scope():
A[0] = A[i] + 2
b = 200
A[3] = b
I find some error occurred. The problem is that ir builder will fold the variable python automatically. In my case, this python code did not appeared in my if_else_scope. Is there any approach to solve this problem?
Appreciate for any explanation of this or any suggestions about this issue. Thanks in advance!