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

[Hexagon] Add USMP tests #11279

merged 5 commits into from
May 13, 2022

Conversation

mehrdadh
Copy link
Member

@mehrdadh mehrdadh commented May 11, 2022

This PR adds USMP tests for hexagon using LLVM and C codegen.

cc @csullivan

@github-actions github-actions bot requested a review from csullivan May 11, 2022 21:33
params = {"weight1": weight1_data, "weight2": weight2_data}
inputs = {"data": input_data}

with tvm.transform.PassContext(opt_level=3, config={"tir.usmp.enable": True}):
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, will add that.

@mehrdadh mehrdadh force-pushed the hexagon/usmp branch 2 times, most recently from 98cb54b to d741e35 Compare May 12, 2022 00:57
executor=Executor("aot", {"unpacked-api": False, "interface-api": "packed"}),
)

assert is_tvm_backendallocworkspace_calls(lowered.lib) == usmp_enabled
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed here: 53912b5

@mehrdadh
Copy link
Member Author

@csullivan PTAL, thanks!

Copy link
Contributor

@csullivan csullivan left a 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! :shipit:

@csullivan csullivan merged commit aa67a6a into apache:main May 13, 2022
mehrdadh added a commit to mehrdadh/tvm that referenced this pull request May 16, 2022
* Add USMP tests

* Address Chris comments

* Address Chris comment on assert

* trigger
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
* Add USMP tests

* Address Chris comments

* Address Chris comment on assert

* trigger
shingjan pushed a commit to shingjan/tvm that referenced this pull request May 17, 2022
* Add USMP tests

* Address Chris comments

* Address Chris comment on assert

* trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants