Unverified Commit dcc6af53 by Tianqi Chen Committed by GitHub

[RUNTIME] Separate runtime related contrib into runtime/contrib (#4207)

parent 13b28566
...@@ -40,14 +40,14 @@ if(USE_CUDA) ...@@ -40,14 +40,14 @@ if(USE_CUDA)
if(USE_CUDNN) if(USE_CUDNN)
message(STATUS "Build with cuDNN support") message(STATUS "Build with cuDNN support")
file(GLOB CONTRIB_CUDNN_SRCS src/contrib/cudnn/*.cc) file(GLOB CONTRIB_CUDNN_SRCS src/runtime/contrib/cudnn/*.cc)
list(APPEND RUNTIME_SRCS ${CONTRIB_CUDNN_SRCS}) list(APPEND RUNTIME_SRCS ${CONTRIB_CUDNN_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUDNN_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUDNN_LIBRARY})
endif(USE_CUDNN) endif(USE_CUDNN)
if(USE_CUBLAS) if(USE_CUBLAS)
message(STATUS "Build with cuBLAS support") message(STATUS "Build with cuBLAS support")
file(GLOB CONTRIB_CUBLAS_SRCS src/contrib/cublas/*.cc) file(GLOB CONTRIB_CUBLAS_SRCS src/runtime/contrib/cublas/*.cc)
list(APPEND RUNTIME_SRCS ${CONTRIB_CUBLAS_SRCS}) list(APPEND RUNTIME_SRCS ${CONTRIB_CUBLAS_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUBLAS_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUBLAS_LIBRARY})
endif(USE_CUBLAS) endif(USE_CUBLAS)
......
...@@ -24,7 +24,7 @@ if(USE_METAL) ...@@ -24,7 +24,7 @@ if(USE_METAL)
list(APPEND RUNTIME_SRCS ${RUNTIME_METAL_SRCS}) list(APPEND RUNTIME_SRCS ${RUNTIME_METAL_SRCS})
if(USE_MPS) if(USE_MPS)
file(GLOB MPS_CONTRIB_SRC src/contrib/mps/*.mm) file(GLOB MPS_CONTRIB_SRC src/runtime/contrib/mps/*.mm)
list(APPEND RUNTIME_SRCS ${MPS_CONTRIB_SRC}) list(APPEND RUNTIME_SRCS ${MPS_CONTRIB_SRC})
find_library(MPS_CONTRIB_LIB MetalPerformanceShaders) find_library(MPS_CONTRIB_LIB MetalPerformanceShaders)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${MPS_CONTRIB_LIB}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${MPS_CONTRIB_LIB})
......
...@@ -37,14 +37,14 @@ if(USE_ROCM) ...@@ -37,14 +37,14 @@ if(USE_ROCM)
if(USE_MIOPEN) if(USE_MIOPEN)
message(STATUS "Build with MIOpen support") message(STATUS "Build with MIOpen support")
file(GLOB MIOPEN_CONTRIB_SRCS src/contrib/miopen/*.cc) file(GLOB MIOPEN_CONTRIB_SRCS src/runtime/contrib/miopen/*.cc)
list(APPEND RUNTIME_SRCS ${MIOPEN_CONTRIB_SRCS}) list(APPEND RUNTIME_SRCS ${MIOPEN_CONTRIB_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_MIOPEN_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_MIOPEN_LIBRARY})
endif(USE_MIOPEN) endif(USE_MIOPEN)
if(USE_ROCBLAS) if(USE_ROCBLAS)
message(STATUS "Build with RocBLAS support") message(STATUS "Build with RocBLAS support")
file(GLOB ROCBLAS_CONTRIB_SRCS src/contrib/rocblas/*.cc) file(GLOB ROCBLAS_CONTRIB_SRCS src/runtime/contrib/rocblas/*.cc)
list(APPEND RUNTIME_SRCS ${ROCBLAS_CONTRIB_SRCS}) list(APPEND RUNTIME_SRCS ${ROCBLAS_CONTRIB_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_ROCBLAS_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_ROCBLAS_LIBRARY})
endif(USE_ROCBLAS) endif(USE_ROCBLAS)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# under the License. # under the License.
# Plugin rules for cblas # Plugin rules for cblas
file(GLOB CBLAS_CONTRIB_SRC src/contrib/cblas/*.cc) file(GLOB CBLAS_CONTRIB_SRC src/runtime/contrib/cblas/*.cc)
if(USE_BLAS STREQUAL "openblas") if(USE_BLAS STREQUAL "openblas")
find_library(BLAS_LIBRARY openblas) find_library(BLAS_LIBRARY openblas)
......
...@@ -20,7 +20,7 @@ if(USE_NNPACK) ...@@ -20,7 +20,7 @@ if(USE_NNPACK)
set(NNPACK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/NNPack) set(NNPACK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/NNPack)
endif() endif()
set(PTHREAD_POOL_PATH ${NNPACK_PATH}/deps/pthreadpool) set(PTHREAD_POOL_PATH ${NNPACK_PATH}/deps/pthreadpool)
file(GLOB NNPACK_CONTRIB_SRC src/contrib/nnpack/*.cc) file(GLOB NNPACK_CONTRIB_SRC src/runtime/contrib/nnpack/*.cc)
list(APPEND RUNTIME_SRCS ${NNPACK_CONTRIB_SRC}) list(APPEND RUNTIME_SRCS ${NNPACK_CONTRIB_SRC})
include_directories(${NNPACK_PATH}/include) include_directories(${NNPACK_PATH}/include)
include_directories(${PTHREAD_POOL_PATH}/include) include_directories(${PTHREAD_POOL_PATH}/include)
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
if(USE_RANDOM) if(USE_RANDOM)
message(STATUS "Build with contrib.random") message(STATUS "Build with contrib.random")
file(GLOB RANDOM_CONTRIB_SRC src/contrib/random/random.cc) file(GLOB RANDOM_CONTRIB_SRC src/runtime/contrib/random/random.cc)
list(APPEND RUNTIME_SRCS ${RANDOM_CONTRIB_SRC}) list(APPEND RUNTIME_SRCS ${RANDOM_CONTRIB_SRC})
endif(USE_RANDOM) endif(USE_RANDOM)
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
if(USE_SORT) if(USE_SORT)
message(STATUS "Build with contrib.sort") message(STATUS "Build with contrib.sort")
file(GLOB SORT_CONTRIB_SRC src/contrib/sort/*.cc) file(GLOB SORT_CONTRIB_SRC src/runtime/contrib/sort/*.cc)
list(APPEND RUNTIME_SRCS ${SORT_CONTRIB_SRC}) list(APPEND RUNTIME_SRCS ${SORT_CONTRIB_SRC})
endif(USE_SORT) endif(USE_SORT)
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external cblas library call. * \file Use external cblas library call.
*/ */
#include <dmlc/logging.h> #include <dmlc/logging.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2018 by Contributors
* \file tvm/contrib/gemm.h * \file tvm/contrib/gemm.h
* \brief Shared implementation of gemm * \brief Shared implementation of gemm
*/ */
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2018 by Contributors
* \file Use external cblas library call. * \file Use external cblas library call.
*/ */
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
......
...@@ -18,13 +18,12 @@ ...@@ -18,13 +18,12 @@
*/ */
/*! /*!
* Copyright (c) 2018 by Contributors
* \file Use external cudnn utils function * \file Use external cudnn utils function
*/ */
#include "cublas_utils.h" #include "cublas_utils.h"
#include <dmlc/thread_local.h> #include <dmlc/thread_local.h>
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include "../../runtime/cuda/cuda_common.h" #include "../../cuda/cuda_common.h"
namespace tvm { namespace tvm {
namespace contrib { namespace contrib {
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
* \file Use external cudnn utils function * \file Use external cudnn utils function
*/ */
#ifndef TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_ #ifndef TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#define TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_ #define TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#include <dmlc/logging.h> #include <dmlc/logging.h>
...@@ -67,4 +67,4 @@ struct CuBlasThreadEntry { ...@@ -67,4 +67,4 @@ struct CuBlasThreadEntry {
} // namespace contrib } // namespace contrib
} // namespace tvm } // namespace tvm
#endif // TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_ #endif // TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function * \file Use external cudnn utils function
*/ */
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function * \file Use external cudnn utils function
*/ */
#include "cudnn_utils.h" #include "cudnn_utils.h"
......
...@@ -18,17 +18,16 @@ ...@@ -18,17 +18,16 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function * \file Use external cudnn utils function
*/ */
#ifndef TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_ #ifndef TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
#define TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_ #define TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
#include <dmlc/logging.h> #include <dmlc/logging.h>
#include <cudnn.h> #include <cudnn.h>
#include <tvm/runtime/device_api.h> #include <tvm/runtime/device_api.h>
#include "../../runtime/cuda/cuda_common.h" #include "../../cuda/cuda_common.h"
namespace tvm { namespace tvm {
...@@ -90,4 +89,4 @@ struct CuDNNThreadEntry { ...@@ -90,4 +89,4 @@ struct CuDNNThreadEntry {
} // namespace contrib } // namespace contrib
} // namespace tvm } // namespace tvm
#endif // TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_ #endif // TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function * \file Use external miopen utils function
*/ */
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function * \file Use external miopen utils function
*/ */
#include "miopen_utils.h" #include "miopen_utils.h"
......
...@@ -18,18 +18,17 @@ ...@@ -18,18 +18,17 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function * \file Use external miopen utils function
*/ */
#ifndef TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_ #ifndef TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#define TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_ #define TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#include <dmlc/logging.h> #include <dmlc/logging.h>
#include <miopen/miopen.h> #include <miopen/miopen.h>
#include <tvm/runtime/device_api.h> #include <tvm/runtime/device_api.h>
#include <string> #include <string>
#include "../../runtime/rocm/rocm_common.h" #include "../../rocm/rocm_common.h"
namespace tvm { namespace tvm {
namespace contrib { namespace contrib {
...@@ -75,4 +74,4 @@ struct MIOpenThreadEntry { ...@@ -75,4 +74,4 @@ struct MIOpenThreadEntry {
} // namespace contrib } // namespace contrib
} // namespace tvm } // namespace tvm
#endif // TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_ #endif // TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
...@@ -18,12 +18,11 @@ ...@@ -18,12 +18,11 @@
*/ */
/*! /*!
* Copyright (c) 2017 by Contributors
* \file Use external mps utils function * \file Use external mps utils function
*/ */
#ifndef TVM_CONTRIB_MPS_MPS_UTILS_H_ #ifndef TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
#define TVM_CONTRIB_MPS_MPS_UTILS_H_ #define TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
#import <MetalPerformanceShaders/MetalPerformanceShaders.h> #import <MetalPerformanceShaders/MetalPerformanceShaders.h>
#include <dmlc/logging.h> #include <dmlc/logging.h>
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <tvm/runtime/util.h> #include <tvm/runtime/util.h>
#include <vector> #include <vector>
#include "../../runtime/metal/metal_common.h" #include "../../metal/metal_common.h"
namespace tvm { namespace tvm {
namespace contrib { namespace contrib {
...@@ -56,4 +55,4 @@ struct MetalThreadEntry { ...@@ -56,4 +55,4 @@ struct MetalThreadEntry {
} // namespace contrib } // namespace contrib
} // namespace tvm } // namespace tvm
#endif // TVM_CONTRIB_MPS_MPS_UTILS_H_ #endif // TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file Use external nnpack library call. * \file Use external nnpack library call.
*/ */
#ifndef TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_ #ifndef TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
#define TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_ #define TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <tvm/runtime/util.h> #include <tvm/runtime/util.h>
#include <dmlc/thread_local.h> #include <dmlc/thread_local.h>
...@@ -41,4 +41,4 @@ struct NNPackThreadLocalEntry { ...@@ -41,4 +41,4 @@ struct NNPackThreadLocalEntry {
bool NNPackConfig(uint64_t nthreads); bool NNPackConfig(uint64_t nthreads);
} // namespace contrib } // namespace contrib
} // namespace tvm } // namespace tvm
#endif // TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_ #endif // TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <sgx_trts.h> #include <sgx_trts.h>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include "../../runtime/sgx/common.h" #include "../../sgx/common.h"
namespace tvm { namespace tvm {
namespace contrib { namespace contrib {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment