Skip to content

[Unity] MetaScheduleApplyDatabase using workload from records#14702

Merged
Hzfengsy merged 1 commit intoapache:unityfrom
MasterJH5574:unity-dev/2023-04-22-ms-database-apply
Apr 23, 2023
Merged

[Unity] MetaScheduleApplyDatabase using workload from records#14702
Hzfengsy merged 1 commit intoapache:unityfrom
MasterJH5574:unity-dev/2023-04-22-ms-database-apply

Conversation

@MasterJH5574
Copy link
Contributor

This PR fixes an issue in MetaScheduleApplyDatabase, which uses the IRModule being queried as the base module of TIR Schedule. This will cause the inconsistency between the IRModule being scheduled and the trace of the record. For example, the trace of the record may have get-block instructions which tries to get block from a given name, which exists in the IRModule of the record while does not exist in the IRModule being queried (which is right the IRModule being scheduled).

Therefore, this PR adds a case discussion. When anchor-op equality is not applied, we create the TIR schedule from the IRModule of the record, so that we can prevent the issue above from happening.

This PR adds a unit test that can demonstrate the issue.

This PR fixes an issue in MetaScheduleApplyDatabase, which uses the
IRModule being queried as the base module of TIR Schedule. This will
cause the inconsistency between the IRModule being scheduled and the
trace of the record. For example, the trace of the record may have
`get-block` instructions which tries to get block from a given name,
which exists in the IRModule of the record while does not exist in the
IRModule being queried (which is right the IRModule being scheduled).

Therefore, this PR adds a case discussion. When anchor-op equality is
not applied, we create the TIR schedule from the IRModule of the record,
so that we can prevent the issue above from happening.

This PR adds a unit test that can demonstrate the issue.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Apr 22, 2023

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

1 similar comment
@tvm-bot
Copy link
Collaborator

tvm-bot commented Apr 22, 2023

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

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

@Hzfengsy Hzfengsy merged commit 19e82ec into apache:unity Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants