-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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][Hexagon] Add postproc for verifying VTCM usage #13538
Conversation
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 |
|
||
def test_conv2d_vtcm(): | ||
def get_target(vtcm_cap): | ||
target = tvm.target.hexagon("v68", vtcm_capacity=vtcm_cap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use get_hexagon_target
(from .infrastructure import get_hexagon_target
) instead of writing your own version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to depend on a file from contrib/test_hexagon
from this file.
@@ -87,6 +87,15 @@ TVM_REGISTER_GLOBAL("tir.analysis.calculate_allocated_bytes").set_body_typed([]( | |||
return CalculateAllocatedBytes(func); | |||
}); | |||
|
|||
bool VerifyVTCMLimit(const PrimFunc& func, Integer limit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like transform::VerifyVTCMLimit
also uses this logic. Can we reuse this function inside that one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wanted to do that, but the pass variant needs vtcm_allocated
in its error message, while this one wants to return only true / false. Refactoring is possible but I thought just duplicating might be cleaner in this case.
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…#13538) * add new postproc VerifyVTCMLimit * remove pass * add test * add doc, missing file * Add back VectorizeLoop in prereq lowering pass * fix lint
Building on #13349, and similar to
VerifyGPUCode
, add a postproc check for the VTCM usage.@csullivan @Icemist @nverke