[REFACTOR][RUNTIME] Phase out include/tvm/runtime/threading_backend.h#19469
Merged
spectrometerHBH merged 2 commits intoApr 29, 2026
Merged
Conversation
All consumers of threading_backend.h are inside src/runtime/ or tests/cpp/ — no Python/compiler/relax/tirx/external callers exist. The header escaped into the public include tree without ever serving a public-API purpose. Move it to src/runtime/ to match the internal-headers cleanup pattern, and update all include paths. TVM_RUNTIME_DLL annotations are preserved; symbol export is unchanged.
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the inclusion of threading_backend.h by replacing public header paths with internal relative paths across several files. Feedback suggests that the header is unused in mt_random_engine.cc and random.cc and should be removed to maintain clean dependencies.
…dom contrib src/runtime/contrib/random/mt_random_engine.cc and random.cc both include threading_backend.h but call no symbol from it. The includes are leftover from earlier code; remove them rather than relocating the path. Verified by grep across the file content for YieldThread/MaxConcurrency/ThreadGroup/parallel_for_with_threading_backend/etc.
spectrometerHBH
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
include/tvm/runtime/threading_backend.hhas been in the public include tree withoutever serving a public-API purpose. All consumers — five
.ccfiles insrc/runtime/and one C++ unit test — are entirely runtime-internal. Moving the header to
src/runtime/to tigthen up access