[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.
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.
I suspect we should because of the padding in conv2d as long as it isn't inlined, but worth checking just in case.
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.
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.
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.
|
@csullivan PTAL, thanks! |
* 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
LLVMandCcodegen.cc @csullivan