Skip to content

Conversation

@zxybazh
Copy link
Member

@zxybazh zxybazh commented Jul 7, 2022

This PR introduces a type check to cast loop split decisions (sometimes given as int64) back to a smaller datatype when the loop variable's data type is smaller. This issue usually happens during reloading a trace from disk using JSON database and causes the failure of CompactBufferAllocation pass.

Unit test is also added.

@zxybazh zxybazh marked this pull request as ready for review July 7, 2022 23:36
@zxybazh
Copy link
Member Author

zxybazh commented Jul 7, 2022

Double checked and confirmed the only source of data type inconsistency comes from directly calling Split with given decisions. Therefore, I introduced a type check in Split's factor parsing part. Ready for review. CC: @junrushao1994

@zxybazh
Copy link
Member Author

zxybazh commented Jul 8, 2022

Fixed and all issues addressed! Thanks for the feedbacks.

@junrushao junrushao changed the title [MetaSchedule][TIR] Patch for Data Type Inconsistency After Trace Reloading [TIR] Avoid unnecessary dtype escalation in loop splitting Jul 8, 2022
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@junrushao
Copy link
Member

Thanks @zxybazh for looking into that!

@junrushao junrushao merged commit 684a838 into apache:main Jul 8, 2022
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
)

This PR introduces a type check to cast loop split decisions (sometimes given as `int64`) back to a smaller datatype when the loop variable's data type is smaller. This issue usually happens during reloading a trace from disk using JSON database and causes the failure of `CompactBufferAllocation` pass.
junrushao pushed a commit to yelite/tvm that referenced this pull request Jul 27, 2022
)

This PR introduces a type check to cast loop split decisions (sometimes given as `int64`) back to a smaller datatype when the loop variable's data type is smaller. This issue usually happens during reloading a trace from disk using JSON database and causes the failure of `CompactBufferAllocation` pass.
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
)

This PR introduces a type check to cast loop split decisions (sometimes given as `int64`) back to a smaller datatype when the loop variable's data type is smaller. This issue usually happens during reloading a trace from disk using JSON database and causes the failure of `CompactBufferAllocation` pass.
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
)

This PR introduces a type check to cast loop split decisions (sometimes given as `int64`) back to a smaller datatype when the loop variable's data type is smaller. This issue usually happens during reloading a trace from disk using JSON database and causes the failure of `CompactBufferAllocation` pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants