Thank you @leeexyz. Yeah, we can use ```tvm.tir.const``` or a new buffer. I
means, it there any mechanism to prevent users using python variables within a
```if_scope```. For example, error message to tell users to utilize
```tvm.tir.const``` since it's quite easy to confuse the python varia
Hi @SYangDong, use `b = tvm.tir.const(100, dtype="float32")` instead of the
assgiment directly.
---
[Visit Topic](https://discuss.tvm.apache.org/t/if-scope-in-ir-builder/9332/2)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [c
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(tm