Skip to content

[REFACTOR][RUNTIME] Phase out include/tvm/runtime/threading_backend.h#19469

Merged
spectrometerHBH merged 2 commits into
apache:mainfrom
tqchen:tvm-demote-threading-backend-internal
Apr 29, 2026
Merged

[REFACTOR][RUNTIME] Phase out include/tvm/runtime/threading_backend.h#19469
spectrometerHBH merged 2 commits into
apache:mainfrom
tqchen:tvm-demote-threading-backend-internal

Conversation

@tqchen

@tqchen tqchen commented Apr 29, 2026

Copy link
Copy Markdown
Member

Summary

include/tvm/runtime/threading_backend.h has been in the public include tree without
ever serving a public-API purpose. All consumers — five .cc files in src/runtime/
and one C++ unit test — are entirely runtime-internal. Moving the header to
src/runtime/ to tigthen up access

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/runtime/contrib/random/mt_random_engine.cc Outdated
Comment thread src/runtime/contrib/random/random.cc Outdated
…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 spectrometerHBH merged commit 59c426e into apache:main Apr 29, 2026
9 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.

2 participants