-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIR] Fix crash on transform_layout #13958
[TIR] Fix crash on transform_layout #13958
Conversation
When `ScheduleTransformLayout` is called, the block corresponding to the BlockRV named `block` is potentially changed. The symbol_table_ however is not updated for changes to BlockRV and hence when the same blockRV `block` is passed to `ScheduleSetAxisSeparator`, the sref corresponding to that is invalid and that results in crash as unknown type_index_ This PR is a temporary fix and a permanent fix would probably need to identify that the BlockRV is not pointing to a valid sref and throw a proper error or update the symbol_table_ appropriately to avoid this error completely.
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 |
This PR provides a temporary fix to the error seen in #13957 |
@tvm-bot rerun |
Just realized that if we enable |
@tvm-bot rerun |
I think as a permanent fix, the schedule primitive should always guarantee correct remapping of block reference. This is achieved by setting correct |
Thanks @vinx13 for the suggestion. I'll try to update this PR with the permanent fix. |
Closing in favor of #14023 |
When
ScheduleTransformLayout
is called, the block corresponding to the BlockRV namedblock
is potentially changed. The symbol_table_ however is not updated for changes to BlockRV and hence when the same blockRVblock
is passed toScheduleSetAxisSeparator
, the sref corresponding to that is invalid and that results in crash as unknown type_index_This PR is a temporary fix and a permanent fix would probably need to identify that the BlockRV is not pointing to a valid sref and throw a proper error or update the symbol_table_ appropriately to avoid this error completely.