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 variable with tvm Expr. It still works sometimes event thought we define some python variables within a ```if_scope```. That really causes me a lot of trouble.
--- [Visit Topic](https://discuss.tvm.apache.org/t/if-scope-in-ir-builder/9332/3) 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/ee271675e3243c7cc65ce4c3ec8cca16cde2ab1cc549d855fc20d90261db3dfb).