[Unity][UX] Symbolic Variables Used in Multiple Functions#14606
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 |
|
Thanks @SiriusNEO for the effort. I am curious about the error in VMShapeLower for this case, could you elaborate it a bit? |
|
@yongwww Sure! For the example above, if you run it you will get error in this line: And the error msg is: But if you remove a function, either |
|
@SiriusNEO Gotcha, thanks! |
|
cc @LeshengJin |
Prior to this PR, there is no constraint to prevent user defining multiple functions which may use the same symbolic TIR var. For example, user may write the following script:
But this script can not be built because
VMShapeLowercan not handle this case well.Since it is a illegal behaviour, we need to prevent user from doing this. Specifically, this PR contains two parts of work:
CopyWithNewVarsutil copies the symbolic vars in the struct info inside the function.