This is an automated email from the ASF dual-hosted git repository.

spectrometerHBH pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 59c426e520 [REFACTOR][RUNTIME] Phase out 
include/tvm/runtime/threading_backend.h (#19469)
59c426e520 is described below

commit 59c426e520dd31e135d8c08bc918e40c711d205d
Author: Tianqi Chen <[email protected]>
AuthorDate: Wed Apr 29 13:00:01 2026 -0400

    [REFACTOR][RUNTIME] Phase out include/tvm/runtime/threading_backend.h 
(#19469)
    
    ## 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
---
 src/runtime/contrib/random/mt_random_engine.cc   | 1 -
 src/runtime/contrib/random/random.cc             | 1 -
 src/runtime/thread_pool.cc                       | 3 ++-
 src/runtime/threading_backend.cc                 | 3 ++-
 {include/tvm => src}/runtime/threading_backend.h | 0
 tests/cpp/threading_backend_test.cc              | 3 ++-
 6 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/runtime/contrib/random/mt_random_engine.cc 
b/src/runtime/contrib/random/mt_random_engine.cc
index 496986905c..506963df50 100644
--- a/src/runtime/contrib/random/mt_random_engine.cc
+++ b/src/runtime/contrib/random/mt_random_engine.cc
@@ -25,7 +25,6 @@
 #include <tvm/runtime/device_api.h>
 #include <tvm/runtime/logging.h>
 #include <tvm/runtime/tensor.h>
-#include <tvm/runtime/threading_backend.h>
 
 #include <algorithm>
 #include <ctime>
diff --git a/src/runtime/contrib/random/random.cc 
b/src/runtime/contrib/random/random.cc
index bee10a233c..1f3fdf869e 100644
--- a/src/runtime/contrib/random/random.cc
+++ b/src/runtime/contrib/random/random.cc
@@ -24,7 +24,6 @@
 #include <tvm/ffi/reflection/registry.h>
 #include <tvm/runtime/data_type.h>
 #include <tvm/runtime/logging.h>
-#include <tvm/runtime/threading_backend.h>
 
 #include <algorithm>
 
diff --git a/src/runtime/thread_pool.cc b/src/runtime/thread_pool.cc
index 292376ab8a..63eba5eba2 100644
--- a/src/runtime/thread_pool.cc
+++ b/src/runtime/thread_pool.cc
@@ -27,7 +27,8 @@
 #include <tvm/runtime/base.h>
 #include <tvm/runtime/c_backend_api.h>
 #include <tvm/runtime/logging.h>
-#include <tvm/runtime/threading_backend.h>
+
+#include "threading_backend.h"
 #if TVM_THREADPOOL_USE_OPENMP
 #include <omp.h>
 #endif
diff --git a/src/runtime/threading_backend.cc b/src/runtime/threading_backend.cc
index 549e6fb9dd..5924629776 100644
--- a/src/runtime/threading_backend.cc
+++ b/src/runtime/threading_backend.cc
@@ -21,11 +21,12 @@
  * \file threading_backend.cc
  * \brief Native threading backend
  */
+#include "threading_backend.h"
+
 #include <tvm/ffi/container/shape.h>
 #include <tvm/ffi/function.h>
 #include <tvm/ffi/reflection/registry.h>
 #include <tvm/runtime/logging.h>
-#include <tvm/runtime/threading_backend.h>
 
 #if defined(__linux__) || defined(__ANDROID__)
 #if __ANDROID_API__ >= 21
diff --git a/include/tvm/runtime/threading_backend.h 
b/src/runtime/threading_backend.h
similarity index 100%
rename from include/tvm/runtime/threading_backend.h
rename to src/runtime/threading_backend.h
diff --git a/tests/cpp/threading_backend_test.cc 
b/tests/cpp/threading_backend_test.cc
index 60149b0ac9..8c30aaeb1e 100644
--- a/tests/cpp/threading_backend_test.cc
+++ b/tests/cpp/threading_backend_test.cc
@@ -17,10 +17,11 @@
  * under the License.
  */
 
+#include "../../src/runtime/threading_backend.h"
+
 #include <gtest/gtest.h>
 #include <tvm/runtime/c_backend_api.h>
 #include <tvm/runtime/logging.h>
-#include <tvm/runtime/threading_backend.h>
 
 #include <atomic>
 #include <memory>

Reply via email to