You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Background
The TVM runtime has been growing organically. Several headers and
directories
live at the top level of `src/runtime/` despite only being consumed by a
single backend subsystem. This PR applies the **locality principle**:
code that
has exactly one consumer moves to live next to that consumer.
## Changes
### Move 1: `thread_map.h` → `src/runtime/vulkan/`
`ThreadMap` is only used by Vulkan device API headers. Moving it under
`src/runtime/vulkan/` reflects this exclusive ownership.
### Move 2: `texture.h` → `src/runtime/opencl/`
Texture storage utilities are OpenCL/Adreno-specific. Moving the header
under `src/runtime/opencl/` makes ownership clear.
### Move 3: `minrpc/` → `src/runtime/rpc/minrpc/`
The minrpc mini-RPC implementation belongs logically under the existing
`src/runtime/rpc/` subtree. All consumers already live under rpc/ or
reference it as a child of rpc/.
### Move 4: Introduce `src/runtime/extra/` boundary
`disco/` and `contrib/` are the sole source directories for
`libtvm_runtime_extra`. Grouping them under `src/runtime/extra/` makes
the
`libtvm_runtime_extra` build boundary visible in the filesystem,
matching
the modular runtime split introduced in #19444.
- `src/runtime/disco/` → `src/runtime/extra/disco/`
- `src/runtime/contrib/` → `src/runtime/extra/contrib/`
- Public `include/tvm/runtime/disco/` is unchanged.
### Drive-by fixes
- `apps/android_rpc/…/tvm_runtime.h`: Drop stale `minrpc_logger.cc`
include
(file no longer exists) and fix stale `tvm-ffi/src/ffi/extra/testing.cc`
path to `tvm-ffi/src/ffi/testing/testing.cc`.
## Test Plan
- [x] Full build (`ninja -j$(nproc)`) — succeeds
- [x] `./cpptest` — 118 tests passed
- [x] Python smoke: `tvm.__version__` + `tvm.cuda(0).exist` — pass
- [x] `tests/python/all-platform-minimal-test` — 37 passed, 105 skipped
- [x] `tests/python/runtime/test_runtime_rpc.py` — 2 passed, 21 skipped
- [x] `tests/python/runtime/test_rpc_base.py` — 2 passed
- [x] `pre-commit run --all-files` — all hooks pass
0 commit comments