Skip to content

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.
@MasterJH5574 MasterJH5574 force-pushed the tvm-dev/2023-11-15-parallel-for branch from 30ec679 to 05d2240 Compare November 15, 2023 18:51
@junrushao junrushao merged commit 748882a into apache:main Nov 16, 2023
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