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!
---
[Visit Topic](https://discuss.tvm.apache.org/t/if-scope-in-ir-builder/9332/1)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.apache.org/email/unsubscribe/3b2a1c7d032219dda12398c55e81d1185456b8ffd3636923e1ac43ef2d708133).