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

[TIR][FIX] update FlopEstimator to include missing nodes #17598

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

PatrikPerssonInceptron
Copy link
Contributor

Updated FlopEstimator to include missing nodes that would otherwise cause tuning to fail for certain TIR functions

@@ -138,6 +138,7 @@ class FlopEstimator : private ExprFunctor<TResult(const PrimExpr& n)>,
}

TResult VisitExpr_(const BufferLoadNode* op) override { return TResult(); }
TResult VisitStmt_(const AttrStmtNode* op) override { return TResult(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need VisitStmt(op->body) for attr annotation since there maybe valid mops under attr body?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was a bit unsure about this when I added the node. My original thought was that the attribute node would only serve to hold values for downstream passes such as codegen and would not be converted to executable code and therefore should not be in the flops estimate.

I updated the visitor to visit the body and value of AttrStmtNode, however I can undo this if it is not correct.

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