-
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
[Hexagon] Add USMP tests #11279
[Hexagon] Add USMP tests #11279
Conversation
params = {"weight1": weight1_data, "weight2": weight2_data} | ||
inputs = {"data": input_data} | ||
|
||
with tvm.transform.PassContext(opt_level=3, config={"tir.usmp.enable": True}): |
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.
Can we also verify in this test that without this pass we do detect TVMBackendAllocWorkspace and then with this pass we detect that they no longer are present?
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 suspect we should because of the padding in conv2d as long as it isn't inlined, but worth checking just in case.
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.
yes, will add that.
98cb54b
to
d741e35
Compare
executor=Executor("aot", {"unpacked-api": False, "interface-api": "packed"}), | ||
) | ||
|
||
assert is_tvm_backendallocworkspace_calls(lowered.lib) == usmp_enabled |
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.
is_tvm_backendallocworkspace_calls(lowered.lib)
returns True if there are backendalloc workspace calls yes?
So if usmp_enabled = True
, then is_tvm_backendallocworkspace_calls(lowered.lib)
should return False.
But that's the opposite of what's written, what did I miss?
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 are absolutely right, thanks for catching this!
The issue was the semantic of is_tvm_backendallocworkspace_calls, it had the opposite semantic of its name.
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.
addressed here: 53912b5
@csullivan PTAL, thanks! |
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.
Thanks @mehrdadh, this LGTM!
* Add USMP tests * Address Chris comments * Address Chris comment on assert * trigger
* Add USMP tests * Address Chris comments * Address Chris comment on assert * trigger
* Add USMP tests * Address Chris comments * Address Chris comment on assert * trigger
This PR adds USMP tests for hexagon using
LLVM
andC
codegen.cc @csullivan