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 FLOPS estimation #8695

Merged
merged 1 commit into from Aug 10, 2021
Merged

Conversation

comaniac
Copy link
Contributor

@comaniac comaniac commented Aug 9, 2021

The AutoScheduler FLOP estimator now mis-estimates the following case to be 0 FLOPS:

tir.if_then_else(A[i] > 0, A[i], 0)

This is because the expression A[i] > 0 has output dtype uint while the input dtypes are float32. In this case the current FLOP estimater ignores the comparison flops. The original concern behinds this logic is to avoid counting index calculation, but we need to make it more general to cover the above case.

cc @merrymercy

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! @comaniac

@junrushao junrushao merged commit 768becd into apache:main Aug 10, 2021
@comaniac comaniac deleted the ansor_flop_est branch August 10, 2021 06:06
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Aug 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

3 participants