[AUTO_SCHEDULER] Add feature extraction directly from PrimFunc#10455
Merged
Conversation
Member
|
cc @comaniac |
Member
|
@tkonolige can you kick another job now that eric PR has landed. |
added 3 commits
March 8, 2022 16:21
Allow users to directly extract features from a PrimFunc. Extracted features can be used to get an estimate of flops, memory load size, or arithmetic intensity from a PrimFunc. Also fix feature extraction to correctly measure the number of arithmetic operations width vector datatypes.
7f6deb3 to
9970eb9
Compare
masahi
reviewed
Mar 9, 2022
| } | ||
|
|
||
| void VisitStmt_(const StoreNode* node) final { | ||
| MathOpCounter math_op_counter; |
Member
There was a problem hiding this comment.
Do we hit this function now? Note that Load / Store node are deprecated after eric PR cc @Lunderberg
Contributor
Author
There was a problem hiding this comment.
No, we don't hit this. I've removed it.
masahi
reviewed
Mar 9, 2022
| + T.load("float32x128", A.data, T.ramp(k, 128, 128), T.broadcast(True, 128)) | ||
| * T.broadcast(T.load("float32", B.data, y * 128 + k), 128), | ||
| T.broadcast(True, 128), | ||
| ) |
Member
There was a problem hiding this comment.
cc @Lunderberg @vinx13 @junrushao1994 on recommendation on using T.load / store in new tests.
Contributor
Author
There was a problem hiding this comment.
I rewrote this to use buffer store.
comaniac
reviewed
Mar 9, 2022
comaniac
left a comment
Contributor
There was a problem hiding this comment.
Otherwise LGTM.
Also cc @merrymercy @junrushao1994 to check the changes in feature extractions.
comaniac
approved these changes
Mar 9, 2022
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
…e#10455) * [AUTO_SCHEDULER] Add feature extraction directly from PrimFunc Allow users to directly extract features from a PrimFunc. Extracted features can be used to get an estimate of flops, memory load size, or arithmetic intensity from a PrimFunc. Also fix feature extraction to correctly measure the number of arithmetic operations width vector datatypes. * fix param name * log scale in cc instead of python * rename functions, remove load/store * forgot rename in tests * forgot to commit rename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow users to directly extract features from a PrimFunc. Extracted features can be used to get an estimate of flops, memory load size, or arithmetic intensity of a PrimFunc. I've improved support to handle PrimFuncs created from a full lowering pass in addition to the limited lowering that auto_scheduler uses.
Also fix feature extraction to correctly measure the number of arithmetic operations width vector datatypes.
This change will not change features used by auto_scheduler's cost models.
@junrushao1994 @merrymercy @masahi