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

[Runtime] Parallel-for with threading backend #16133

Merged
merged 1 commit into from Nov 16, 2023

Conversation

MasterJH5574
Copy link
Contributor

This PR introduces the runtime parallel-for helper function in C++ with the threading backend in TVM.

Right now the existing parallel-for in TVM is not thread persistent,
in which case we cannot get persistent TLS for each thread.

The introduced parallel-for-with-threading-backend function leverages the threading backend in TVM and persists threads.

@MasterJH5574 MasterJH5574 force-pushed the tvm-dev/2023-11-15-parallel-for branch 6 times, most recently from 9969654 to 30ec679 Compare November 15, 2023 17:43
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM!

This PR introduces the runtime parallel-for helper function
in C++ with the threading backend in TVM.

Right now the existing [parallel-for](https://github.com/apache/tvm/blob/bd67d2e5ebde1aec18bcfa74c087516579bda1ae/include/tvm/support/parallel_for.h#L48-L68)
in TVM is not thread persistent,
in which case we cannot get persistent TLS for each thread.

The introduced parallel-for-with-threading-backend function
leverages the threading backend in TVM and persists threads.
@junrushao junrushao merged commit 748882a into apache:main Nov 16, 2023
17 checks passed
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.

None yet

2 participants