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

[AutoScheduler] Fix task scheduler after 8478 #8984

Merged
merged 2 commits into from
Sep 11, 2021
Merged

Conversation

comaniac
Copy link
Contributor

#8478 added .value to the use of cur_score. However, its type may not be a TVM primitive but a numpy value. In this case, we will encounter the following error:

total_latency_str = "%.3f" % (task_scheduler.cur_score.value * 1e3)
AttributeError: 'numpy.float64' object has no attribute 'value

Although I cannot find the reason why cur_score would be a TVM primitive, I make sure its producer _compute_score returns a native/numpy value in this PR.

cc @echuraev @jcf94

Copy link
Contributor

@shingjan shingjan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for doing this!

Copy link
Contributor

@jcf94 jcf94 left a comment

Choose a reason for hiding this comment

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

Thanks! I've also met this bug before.
The CI seems to be blocked by another flaky problem...

@vinx13 vinx13 merged commit 02f885a into apache:main Sep 11, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
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.

None yet

4 participants