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

Cap hexagon max con to number of HVX units #12394

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Cap hexagon max con to number of HVX units #12394

merged 1 commit into from
Aug 12, 2022

Conversation

nverke
Copy link
Contributor

@nverke nverke commented Aug 11, 2022

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

Background
Creating more threads than there are HVX units causes performance degradation when threads are unable to reserve an HVX unit and end up running vector instructions on the Scalar cores. Capping the max number of threads to be the number of available HVX units on the device prevents this from occurring and results in better performance on hexagon.

Testing
Ran tests in simulator mode as well on a hexagon HDK to ensure that the expected result of locking max_concurrency to 4 was achieved.

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.

LGTM, thanks @nverke!

@csullivan csullivan merged commit 57a02f7 into apache:main Aug 12, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
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.

3 participants