Skip to content
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

[MetaSchedule] MutateTileSize skip single-candidate SampleCategorical #14072

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

MasterJH5574
Copy link
Contributor

When handling SampleCategorical instructions, our MutateTileSize mutator mutates it by asserting that "there should be at least one candidate other than the current decision". However, this argument fails when a SampleCategorical instruction has only one candidate, since there is no other candidate besides the unique one. On such cases, the mutator will lead to exception.

For such cases, the expected behavior is that the mutator ignores such SampleCategorical instructions. This PR updates the mutator in this way and provides a regression test.

When handling SampleCategorical instructions, our MutateTileSize mutator
mutates it by asserting that "there should be at least one candidate
other than the current decision". However, this argument fails when a
SampleCategorical instruction has only one candidate, since there is no
other candidate besides the unique one. On such cases, the mutator will
lead to exception.

For such cases, the expected behavior is that the mutator ignores such
SampleCategorical instructions. This PR updates the mutator in this way
and provides a regression test.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 21, 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

@tqchen tqchen left a comment

Choose a reason for hiding this comment

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

LTGM

@tqchen tqchen merged commit bd26c24 into apache:main Feb 22, 2023
yongwww pushed a commit to yongwww/tvm that referenced this pull request Feb 27, 2023
…apache#14072)

When handling SampleCategorical instructions, our MutateTileSize mutator
mutates it by asserting that "there should be at least one candidate
other than the current decision". However, this argument fails when a
SampleCategorical instruction has only one candidate, since there is no
other candidate besides the unique one. On such cases, the mutator will
lead to exception.

For such cases, the expected behavior is that the mutator ignores such
SampleCategorical instructions. This PR updates the mutator in this way
and provides a regression test.
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.

4 participants