[TVMScript] Create loop var with min_val dtype in for frame#15547
[TVMScript] Create loop var with min_val dtype in for frame#15547Hzfengsy merged 1 commit intoapache:mainfrom
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
Hzfengsy
left a comment
There was a problem hiding this comment.
LGTM. There are two questions beyond this PR:
- What's the purpose of using
uintin loops? For arithmetic analysis or it's related to the hardware backend. - What's the Script syntax when we use
uint, i.e., you've added a test case for the ir_builder, which is great. But I wonder how it can be used in the parser
|
Thanks for reply. I think these two problems can be shown in one example:
BTW, I come from Arm China. And we discovered this issue when utilizing TVM Script to create a DSL for our custom operators during the process of writing the actual operators. cc @Johnson9009 |
Currently, int is always used when creating loop var in a for frame. So if the iteration variable is uint when creating the for frame, it will fail.
The explicit type brings great convenience to subsequent analysis. So I think it's better to create explicit variables rather than convert to int.