-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Hexagon] [runtime] Per-thread hardware resource management #13181
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
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment. Generated by tvm-bot |
|
@tvm-bot run |
1 similar comment
|
@tvm-bot run |
csullivan
left a comment
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.
Great! Just a few questions
csullivan
left a comment
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.
LGTM ![]()
…3181) Add support to lock and unlock resources on the individual threads. Adds APIs to get a thread handle for a given resource type, and get a resource type for a given thread handle. This will aid in asynchronous support that is sending work to dedicated threads for the hardware resources. There are two steps to fully acquire a resource: reserve and lock. HTP/HVX manager objects are created on the global thread, which will reserve the resources. The lock/unlock will occur on the thread that owns a particular instance. The manager objects will be deconstructed when the thread manager is deconstructed. This will release the resources.
…3181) Add support to lock and unlock resources on the individual threads. Adds APIs to get a thread handle for a given resource type, and get a resource type for a given thread handle. This will aid in asynchronous support that is sending work to dedicated threads for the hardware resources. There are two steps to fully acquire a resource: reserve and lock. HTP/HVX manager objects are created on the global thread, which will reserve the resources. The lock/unlock will occur on the thread that owns a particular instance. The manager objects will be deconstructed when the thread manager is deconstructed. This will release the resources.
Add support to lock and unlock resources on the individual threads. Adds APIs to get a thread handle for a given resource type, and get a resource type for a given thread handle. This will aid in asynchronous support that is sending work to dedicated threads for the hardware resources.
There are two steps to fully acquire a resource: reserve and lock. HTP/HVX manager objects are created on the global thread, which will reserve the resources. The lock/unlock will occur on the thread that owns a particular instance. The manager objects will be deconstructed when the thread manager is deconstructed. This will release the resources.
cc: @csullivan, @adstraw, @JosephTheOctonaut, @kparzysz-quic