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

[Hexagon] Add USMP tests #11279

Merged
merged 5 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address Chris comment on assert
  • Loading branch information
mehrdadh committed May 12, 2022
commit 53912b5a96d164cc88d72fecb2cc6805e8f6ed32
4 changes: 2 additions & 2 deletions python/tvm/testing/usmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def is_tvm_backendallocworkspace_calls(mod: tvm.runtime.module) -> bool:

source = dso_mod.get_source()
if source.count("TVMBackendAllocWorkspace") != 0:
return False
return True

return True
return False
2 changes: 1 addition & 1 deletion tests/python/contrib/test_hexagon/test_usmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_conv2d(hexagon_session: Session, aot_host_target, aot_target, usmp_enab
executor=Executor("aot", {"unpacked-api": False, "interface-api": "packed"}),
)

assert is_tvm_backendallocworkspace_calls(lowered.lib) == usmp_enabled
assert is_tvm_backendallocworkspace_calls(lowered.lib) != usmp_enabled

aot_mod = hexagon_session.get_executor_from_factory(lowered)
aot_mod.set_input(**inputs)
Expand Down
4 changes: 2 additions & 2 deletions tests/python/relay/aot/test_crt_aot_usmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@


def _check_for_no_tvm_backendallocworkspace_calls(mod: tvm.runtime.module):
assert is_tvm_backendallocworkspace_calls(
mod
assert (
is_tvm_backendallocworkspace_calls(mod) == False
), "This is failing because USMP was unable to plan for every tir.allocate node."


Expand Down