Skip to content

Commit 23db01f

Browse files
authored
[REFACTOR][RUNTIME] Structural reorganization: locality moves for thread_map, texture, minrpc, disco, contrib (#19628)
## 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
1 parent 7c21470 commit 23db01f

136 files changed

Lines changed: 129 additions & 131 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ tvm_file_glob(GLOB RUNTIME_SRCS
344344
src/runtime/*.cc
345345
src/runtime/vm/*.cc
346346
src/runtime/memory/*.cc
347-
src/runtime/minrpc/*.cc
347+
src/runtime/rpc/minrpc/*.cc
348348
)
349-
# Note: src/runtime/disco/** moves to libtvm_runtime_extra.
349+
# Note: src/runtime/extra/disco/** moves to libtvm_runtime_extra.
350350
# Note: src/runtime/{cuda,vulkan,opencl,metal,rocm,hexagon}/* move to per-backend DSOs.
351351
set(TVM_RUNTIME_EXT_OBJS "")
352352

@@ -455,14 +455,14 @@ include(cmake/modules/Git.cmake)
455455

456456
# ---- libtvm_runtime_extra assembly ----
457457
# Disco core sources.
458-
tvm_file_glob(GLOB _disco_core_srcs src/runtime/disco/*.cc)
458+
tvm_file_glob(GLOB _disco_core_srcs src/runtime/extra/disco/*.cc)
459459
add_library(tvm_disco_objs OBJECT ${_disco_core_srcs})
460460
target_link_libraries(tvm_disco_objs PRIVATE tvm_runtime_extra_defs)
461461
target_link_libraries(tvm_runtime_extra PRIVATE tvm_disco_objs)
462462

463463
# Distributed disco (disabled for Hexagon cross-compile).
464464
if(NOT BUILD_FOR_HEXAGON)
465-
tvm_file_glob(GLOB _disco_dist_srcs src/runtime/disco/distributed/*.cc)
465+
tvm_file_glob(GLOB _disco_dist_srcs src/runtime/extra/disco/distributed/*.cc)
466466
add_library(tvm_disco_distributed_objs OBJECT ${_disco_dist_srcs})
467467
target_link_libraries(tvm_disco_distributed_objs PRIVATE tvm_runtime_extra_defs)
468468
target_link_libraries(tvm_runtime_extra PRIVATE tvm_disco_distributed_objs)
@@ -472,8 +472,8 @@ endif()
472472
if(USE_CUDA AND USE_NCCL)
473473
find_nccl(${USE_NCCL})
474474
include_directories(SYSTEM ${NCCL_INCLUDE_DIR})
475-
tvm_file_glob(GLOB _nccl_srcs src/runtime/disco/nccl/*.cc src/runtime/disco/cuda_ipc/*.cc 3rdparty/tensorrt_llm/*.cu)
476-
set_source_files_properties(src/runtime/disco/nccl/nccl.cc PROPERTIES COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=0")
475+
tvm_file_glob(GLOB _nccl_srcs src/runtime/extra/disco/nccl/*.cc src/runtime/extra/disco/cuda_ipc/*.cc 3rdparty/tensorrt_llm/*.cu)
476+
set_source_files_properties(src/runtime/extra/disco/nccl/nccl.cc PROPERTIES COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=0")
477477
add_library(tvm_nccl_objs OBJECT ${_nccl_srcs})
478478
target_link_libraries(tvm_nccl_objs PRIVATE tvm_runtime_extra_defs)
479479
find_library(LIBRT rt)
@@ -488,7 +488,7 @@ if(USE_CUDA AND USE_NVSHMEM)
488488
endif()
489489
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
490490
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
491-
tvm_file_glob(GLOB _nvshmem_srcs src/runtime/contrib/nvshmem/*.cc src/runtime/contrib/nvshmem/*.cu)
491+
tvm_file_glob(GLOB _nvshmem_srcs src/runtime/extra/contrib/nvshmem/*.cc src/runtime/extra/contrib/nvshmem/*.cu)
492492
add_library(tvm_nvshmem_objs OBJECT ${_nvshmem_srcs})
493493
target_link_libraries(tvm_nvshmem_objs PRIVATE tvm_runtime_extra_defs)
494494
target_include_directories(tvm_nvshmem_objs PUBLIC ${NVSHMEM_INCLUDE_DIR})
@@ -502,8 +502,8 @@ endif()
502502
if(USE_ROCM AND USE_RCCL)
503503
find_rccl(${USE_RCCL})
504504
include_directories(SYSTEM ${RCCL_INCLUDE_DIR})
505-
tvm_file_glob(GLOB _rccl_srcs src/runtime/disco/nccl/*.cc)
506-
set_source_files_properties(src/runtime/disco/nccl/nccl.cc PROPERTIES COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=1")
505+
tvm_file_glob(GLOB _rccl_srcs src/runtime/extra/disco/nccl/*.cc)
506+
set_source_files_properties(src/runtime/extra/disco/nccl/nccl.cc PROPERTIES COMPILE_DEFINITIONS "TVM_NCCL_RCCL_SWITCH=1")
507507
add_library(tvm_rccl_objs OBJECT ${_rccl_srcs})
508508
target_link_libraries(tvm_rccl_objs PRIVATE tvm_runtime_extra_defs)
509509
target_link_libraries(tvm_runtime_extra PRIVATE tvm_rccl_objs rccl)

apps/android_rpc/app/src/main/jni/tvm_runtime.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "../3rdparty/tvm-ffi/src/ffi/extra/library_module_dynamic_lib.cc"
4141
#include "../3rdparty/tvm-ffi/src/ffi/extra/library_module_system_lib.cc"
4242
#include "../3rdparty/tvm-ffi/src/ffi/extra/module.cc"
43-
#include "../3rdparty/tvm-ffi/src/ffi/extra/testing.cc"
4443
#include "../3rdparty/tvm-ffi/src/ffi/function.cc"
4544
#include "../3rdparty/tvm-ffi/src/ffi/object.cc"
4645
#include "../3rdparty/tvm-ffi/src/ffi/tensor.cc"
@@ -49,7 +48,6 @@
4948
#include "../src/runtime/file_utils.cc"
5049
#include "../src/runtime/logging.cc"
5150
#include "../src/runtime/memory/memory_manager.cc"
52-
#include "../src/runtime/minrpc/minrpc_logger.cc"
5351
#include "../src/runtime/registry.cc"
5452
#include "../src/runtime/rpc/rpc_channel.cc"
5553
#include "../src/runtime/rpc/rpc_endpoint.cc"
@@ -85,11 +83,11 @@
8583
#endif
8684

8785
#ifdef USE_SORT
88-
#include "../src/runtime/contrib/sort/sort.cc"
86+
#include "../src/runtime/extra/contrib/sort/sort.cc"
8987
#endif
9088

9189
#ifdef USE_RANDOM
92-
#include "../src/runtime/contrib/random/random.cc"
90+
#include "../src/runtime/extra/contrib/random/random.cc"
9391
#endif
9492

9593
#include <android/log.h>

cmake/modules/CUDA.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if(USE_CUDA AND USE_CUDNN)
9898
include_directories(SYSTEM ${CUDA_CUDNN_INCLUDE_DIRS})
9999
tvm_file_glob(GLOB CUDNN_RELAX_CONTRIB_SRC src/relax/backend/contrib/cudnn/*.cc)
100100
list(APPEND COMPILER_SRCS ${CUDNN_RELAX_CONTRIB_SRC})
101-
tvm_file_glob(GLOB CONTRIB_CUDNN_SRCS src/runtime/contrib/cudnn/*.cc)
101+
tvm_file_glob(GLOB CONTRIB_CUDNN_SRCS src/runtime/extra/contrib/cudnn/*.cc)
102102
add_library(tvm_cudnn_objs OBJECT ${CONTRIB_CUDNN_SRCS})
103103
target_link_libraries(tvm_cudnn_objs PRIVATE tvm_runtime_extra_defs)
104104
target_link_libraries(tvm_runtime_extra PRIVATE tvm_cudnn_objs ${CUDA_CUDNN_LIBRARY})
@@ -115,7 +115,7 @@ if(USE_CUDA AND USE_CUDNN_FRONTEND)
115115
if(NOT CUDNN_FRONTEND_HEADER)
116116
message(FATAL_ERROR "Cannot find cudnn_frontend.h, please set USE_CUDNN_FRONTEND to the path of the cuDNN frontend header")
117117
endif()
118-
tvm_file_glob(GLOB CONTRIB_CUDNN_FRONTEND_SRCS src/runtime/contrib/cudnn/cudnn_frontend/*.cc)
118+
tvm_file_glob(GLOB CONTRIB_CUDNN_FRONTEND_SRCS src/runtime/extra/contrib/cudnn/cudnn_frontend/*.cc)
119119
set_source_files_properties(${CONTRIB_CUDNN_SRCS} PROPERTIES COMPILE_DEFINITIONS TVM_USE_CUDNN_FRONTEND=1)
120120
add_library(tvm_cudnn_frontend_objs OBJECT ${CONTRIB_CUDNN_FRONTEND_SRCS})
121121
target_link_libraries(tvm_cudnn_frontend_objs PRIVATE tvm_runtime_extra_defs)
@@ -126,7 +126,7 @@ if(USE_CUDA AND USE_CUBLAS)
126126
message(STATUS "Build with cuBLAS support")
127127
tvm_file_glob(GLOB CUBLAS_CONTRIB_SRC src/relax/backend/contrib/cublas/*.cc)
128128
list(APPEND COMPILER_SRCS ${CUBLAS_CONTRIB_SRC})
129-
tvm_file_glob(GLOB CONTRIB_CUBLAS_SRCS src/runtime/contrib/cublas/*.cc)
129+
tvm_file_glob(GLOB CONTRIB_CUBLAS_SRCS src/runtime/extra/contrib/cublas/*.cc)
130130
add_library(tvm_cublas_objs OBJECT ${CONTRIB_CUBLAS_SRCS})
131131
target_link_libraries(tvm_cublas_objs PRIVATE tvm_runtime_extra_defs)
132132
target_link_libraries(tvm_runtime_extra PRIVATE tvm_cublas_objs ${CUDA_CUBLAS_LIBRARY})
@@ -137,7 +137,7 @@ endif(USE_CUDA AND USE_CUBLAS)
137137

138138
if(USE_CUDA AND USE_THRUST)
139139
message(STATUS "Build with Thrust support")
140-
tvm_file_glob(GLOB CONTRIB_THRUST_SRC src/runtime/contrib/thrust/*.cu)
140+
tvm_file_glob(GLOB CONTRIB_THRUST_SRC src/runtime/extra/contrib/thrust/*.cu)
141141
add_library(tvm_thrust_objs OBJECT ${CONTRIB_THRUST_SRC})
142142
target_link_libraries(tvm_thrust_objs PRIVATE tvm_runtime_extra_defs)
143143
target_compile_options(tvm_thrust_objs PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>)
@@ -151,8 +151,8 @@ endif(USE_CUDA AND USE_THRUST)
151151
if(USE_CUDA AND USE_CURAND)
152152
message(STATUS "Build with cuRAND support")
153153
message(STATUS "${CUDA_CURAND_LIBRARY}")
154-
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CC src/runtime/contrib/curand/*.cc)
155-
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CU src/runtime/contrib/curand/*.cu)
154+
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CC src/runtime/extra/contrib/curand/*.cc)
155+
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CU src/runtime/extra/contrib/curand/*.cu)
156156
add_library(tvm_curand_objs OBJECT ${CONTRIB_CURAND_SRC_CC} ${CONTRIB_CURAND_SRC_CU})
157157
target_link_libraries(tvm_curand_objs PRIVATE tvm_runtime_extra_defs)
158158
target_link_libraries(tvm_runtime_extra PRIVATE tvm_curand_objs ${CUDA_CURAND_LIBRARY})

cmake/modules/Hexagon.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ if(USE_HEXAGON_RPC)
289289

290290
# Include the generic RPC code into the TVM runtime.
291291
list(APPEND RUNTIME_HEXAGON_SRCS
292-
"${TVMRT_SOURCE_DIR}/minrpc/minrpc_server.h"
293-
"${TVMRT_SOURCE_DIR}/minrpc/rpc_reference.h"
292+
"${TVMRT_SOURCE_DIR}/rpc/minrpc/minrpc_server.h"
293+
"${TVMRT_SOURCE_DIR}/rpc/minrpc/rpc_reference.h"
294294
"${TVMRT_SOURCE_DIR}/rpc/rpc_module.cc"
295295
"${TVMRT_SOURCE_DIR}/rpc/rpc_endpoint.cc"
296296
"${TVMRT_SOURCE_DIR}/rpc/rpc_session.cc"

cmake/modules/ROCM.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if(USE_ROCM AND USE_HIPBLAS)
6464
message(STATUS "Build with HIPBLAS support")
6565
tvm_file_glob(GLOB HIPBLAS_CONTRIB_SRC src/relax/backend/contrib/hipblas/*.cc)
6666
list(APPEND COMPILER_SRCS ${HIPBLAS_CONTRIB_SRC})
67-
tvm_file_glob(GLOB HIPBLAS_CONTRIB_SRCS src/runtime/contrib/hipblas/*.cc)
67+
tvm_file_glob(GLOB HIPBLAS_CONTRIB_SRCS src/runtime/extra/contrib/hipblas/*.cc)
6868
add_library(tvm_hipblas_objs OBJECT ${HIPBLAS_CONTRIB_SRCS})
6969
target_link_libraries(tvm_hipblas_objs PRIVATE tvm_runtime_extra_defs)
7070
target_link_libraries(tvm_runtime_extra PRIVATE tvm_hipblas_objs ${ROCM_HIPBLAS_LIBRARY})
@@ -84,8 +84,8 @@ if(USE_ROCM AND USE_THRUST)
8484

8585
find_package(rocprim REQUIRED)
8686
find_package(rocthrust REQUIRED)
87-
set_source_files_properties(src/runtime/contrib/thrust/thrust.cu PROPERTIES LANGUAGE CXX)
88-
add_library(tvm_rocthrust_objs OBJECT src/runtime/contrib/thrust/thrust.cu)
87+
set_source_files_properties(src/runtime/extra/contrib/thrust/thrust.cu PROPERTIES LANGUAGE CXX)
88+
add_library(tvm_rocthrust_objs OBJECT src/runtime/extra/contrib/thrust/thrust.cu)
8989
target_link_libraries(tvm_rocthrust_objs PRIVATE tvm_runtime_extra_defs)
9090
target_link_libraries(tvm_runtime_extra PRIVATE tvm_rocthrust_objs roc::rocthrust)
9191
endif(USE_ROCM AND USE_THRUST)

cmake/modules/contrib/AMX.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
if(USE_AMX)
19-
file(GLOB AMX_RUNTIME_CONFIG src/runtime/contrib/amx/amx_config.cc)
19+
file(GLOB AMX_RUNTIME_CONFIG src/runtime/extra/contrib/amx/amx_config.cc)
2020
list(APPEND COMPILER_SRCS ${AMX_RUNTIME_CONFIG})
2121
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=sapphirerapids")
2222
message(STATUS "Build with Intel AMX support...")

cmake/modules/contrib/BLAS.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
if(USE_BLAS STREQUAL "openblas")
1919
find_library(BLAS_LIBRARY openblas)
20-
add_library(tvm_blas_objs OBJECT src/runtime/contrib/cblas/cblas.cc)
20+
add_library(tvm_blas_objs OBJECT src/runtime/extra/contrib/cblas/cblas.cc)
2121
target_link_libraries(tvm_blas_objs PRIVATE tvm_runtime_extra_defs)
2222
target_link_libraries(tvm_runtime_extra PRIVATE tvm_blas_objs ${BLAS_LIBRARY})
2323
message(STATUS "Using BLAS library " ${BLAS_LIBRARY})
@@ -28,14 +28,14 @@ if(USE_BLAS STREQUAL "openblas")
2828
endif()
2929
elseif(USE_BLAS STREQUAL "atlas" OR USE_BLAS STREQUAL "blas")
3030
find_library(BLAS_LIBRARY cblas)
31-
add_library(tvm_blas_objs OBJECT src/runtime/contrib/cblas/cblas.cc)
31+
add_library(tvm_blas_objs OBJECT src/runtime/extra/contrib/cblas/cblas.cc)
3232
target_link_libraries(tvm_blas_objs PRIVATE tvm_runtime_extra_defs)
3333
target_link_libraries(tvm_runtime_extra PRIVATE tvm_blas_objs ${BLAS_LIBRARY})
3434
message(STATUS "Use BLAS library " ${BLAS_LIBRARY})
3535
elseif(USE_BLAS STREQUAL "apple")
3636
find_library(BLAS_LIBRARY Accelerate)
3737
include_directories(SYSTEM ${BLAS_LIBRARY}/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/)
38-
add_library(tvm_blas_objs OBJECT src/runtime/contrib/cblas/cblas.cc)
38+
add_library(tvm_blas_objs OBJECT src/runtime/extra/contrib/cblas/cblas.cc)
3939
target_link_libraries(tvm_blas_objs PRIVATE tvm_runtime_extra_defs)
4040
target_link_libraries(tvm_runtime_extra PRIVATE tvm_blas_objs ${BLAS_LIBRARY})
4141
message(STATUS "Use BLAS library " ${BLAS_LIBRARY})
@@ -66,7 +66,7 @@ if(USE_MKL OR USE_MKL_PATH)
6666
find_library(BLAS_LIBRARY_MKL NAMES mkl_rt HINTS ${USE_MKL}/lib/ ${USE_MKL}/lib/intel64_win)
6767
endif()
6868
include_directories(SYSTEM ${USE_MKL}/include)
69-
add_library(tvm_mkl_objs OBJECT src/runtime/contrib/cblas/mkl.cc)
69+
add_library(tvm_mkl_objs OBJECT src/runtime/extra/contrib/cblas/mkl.cc)
7070
target_link_libraries(tvm_mkl_objs PRIVATE tvm_runtime_extra_defs)
7171
target_link_libraries(tvm_runtime_extra PRIVATE tvm_mkl_objs ${BLAS_LIBRARY_MKL})
7272
add_definitions(-DUSE_MKL_BLAS=1)

cmake/modules/contrib/CLML.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
if(USE_CLML)
1919
file(GLOB CLML_RELAX_CONTRIB_SRC src/relax/backend/contrib/clml/*.cc)
20-
file(GLOB CLML_RUNTIME_MODULE src/runtime/contrib/clml/clml_runtime.cc)
20+
file(GLOB CLML_RUNTIME_MODULE src/runtime/extra/contrib/clml/clml_runtime.cc)
2121
include_directories(SYSTEM "3rdparty/OpenCL-Headers")
2222
list(APPEND COMPILER_SRCS ${CLML_RELAX_CONTRIB_SRC})
2323
if(NOT USE_CLML_GRAPH_EXECUTOR)
@@ -49,7 +49,7 @@ if(USE_CLML_GRAPH_EXECUTOR)
4949
set(CLML_PATH ${USE_CLML_GRAPH_EXECUTOR})
5050
endif()
5151

52-
file(GLOB CLML_CONTRIB_SRC src/runtime/contrib/clml/*)
52+
file(GLOB CLML_CONTRIB_SRC src/runtime/extra/contrib/clml/*)
5353

5454
# CMake needs to find clml library, include and support directories
5555
# in the path specified by CLML_PATH.

cmake/modules/contrib/CUTLASS.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if(USE_CUDA AND USE_CUTLASS)
3333
target_link_libraries(fpA_intB_gemm_tvm PRIVATE tvm_ffi_header)
3434

3535
set(CUTLASS_FPA_INTB_RUNTIME_SRCS "")
36-
list(APPEND CUTLASS_FPA_INTB_RUNTIME_SRCS src/runtime/contrib/cutlass/weight_preprocess.cc)
36+
list(APPEND CUTLASS_FPA_INTB_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/weight_preprocess.cc)
3737
add_library(fpA_intB_cutlass_objs OBJECT ${CUTLASS_FPA_INTB_RUNTIME_SRCS})
3838
target_link_libraries(fpA_intB_cutlass_objs PRIVATE tvm_runtime_extra_defs)
3939
target_include_directories(fpA_intB_cutlass_objs PRIVATE
@@ -54,15 +54,15 @@ if(USE_CUDA AND USE_CUTLASS)
5454
set(TVM_CUTLASS_RUNTIME_SRCS "")
5555

5656
if(CMAKE_CUDA_ARCHITECTURES MATCHES "90a")
57-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp16_group_gemm_sm90.cu)
58-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp8_group_gemm_sm90.cu)
59-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp8_gemm.cu)
60-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp8_groupwise_scaled_gemm_sm90.cu)
57+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp16_group_gemm_sm90.cu)
58+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp8_group_gemm_sm90.cu)
59+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp8_gemm.cu)
60+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp8_groupwise_scaled_gemm_sm90.cu)
6161
endif()
6262
if(CMAKE_CUDA_ARCHITECTURES MATCHES "100a")
63-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp16_group_gemm_sm100.cu)
64-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp8_groupwise_scaled_gemm_sm100.cu)
65-
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/contrib/cutlass/fp8_groupwise_scaled_group_gemm_sm100.cu)
63+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp16_group_gemm_sm100.cu)
64+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp8_groupwise_scaled_gemm_sm100.cu)
65+
list(APPEND TVM_CUTLASS_RUNTIME_SRCS src/runtime/extra/contrib/cutlass/fp8_groupwise_scaled_group_gemm_sm100.cu)
6666
endif()
6767
if(TVM_CUTLASS_RUNTIME_SRCS)
6868
add_library(tvm_cutlass_objs OBJECT ${TVM_CUTLASS_RUNTIME_SRCS})

cmake/modules/contrib/CoreML.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if(USE_COREML)
1919
message(STATUS "Build with contrib.coreml")
2020
find_library(FOUNDATION_LIB Foundation)
2121
find_library(COREML_LIB Coreml)
22-
tvm_file_glob(GLOB COREML_CONTRIB_SRC src/runtime/contrib/coreml/*.mm)
22+
tvm_file_glob(GLOB COREML_CONTRIB_SRC src/runtime/extra/contrib/coreml/*.mm)
2323
add_library(tvm_coreml_objs OBJECT ${COREML_CONTRIB_SRC})
2424
target_link_libraries(tvm_coreml_objs PRIVATE tvm_runtime_extra_defs)
2525
target_link_libraries(tvm_runtime_extra PRIVATE tvm_coreml_objs ${FOUNDATION_LIB} ${COREML_LIB})

0 commit comments

Comments
 (0)