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)
if(USE_CUDNN)
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 TVM_RUNTIME_LINKER_LIBS ${CUDA_CUDNN_LIBRARY})
endif(USE_CUDNN)
if(USE_CUBLAS)
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 TVM_RUNTIME_LINKER_LIBS ${CUDA_CUBLAS_LIBRARY})
endif(USE_CUBLAS)
......
......@@ -24,7 +24,7 @@ if(USE_METAL)
list(APPEND RUNTIME_SRCS ${RUNTIME_METAL_SRCS})
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})
find_library(MPS_CONTRIB_LIB MetalPerformanceShaders)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${MPS_CONTRIB_LIB})
......
......@@ -37,14 +37,14 @@ if(USE_ROCM)
if(USE_MIOPEN)
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 TVM_RUNTIME_LINKER_LIBS ${ROCM_MIOPEN_LIBRARY})
endif(USE_MIOPEN)
if(USE_ROCBLAS)
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 TVM_RUNTIME_LINKER_LIBS ${ROCM_ROCBLAS_LIBRARY})
endif(USE_ROCBLAS)
......
......@@ -16,7 +16,7 @@
# under the License.
# 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")
find_library(BLAS_LIBRARY openblas)
......
......@@ -20,7 +20,7 @@ if(USE_NNPACK)
set(NNPACK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/NNPack)
endif()
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})
include_directories(${NNPACK_PATH}/include)
include_directories(${PTHREAD_POOL_PATH}/include)
......
......@@ -17,6 +17,6 @@
if(USE_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})
endif(USE_RANDOM)
......@@ -17,6 +17,6 @@
if(USE_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})
endif(USE_SORT)
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external cblas library call.
*/
#include <dmlc/logging.h>
......
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2018 by Contributors
* \file tvm/contrib/gemm.h
* \brief Shared implementation of gemm
*/
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2018 by Contributors
* \file Use external cblas library call.
*/
#include <tvm/runtime/registry.h>
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,13 +18,12 @@
*/
/*!
* Copyright (c) 2018 by Contributors
* \file Use external cudnn utils function
*/
#include "cublas_utils.h"
#include <dmlc/thread_local.h>
#include <tvm/runtime/registry.h>
#include "../../runtime/cuda/cuda_common.h"
#include "../../cuda/cuda_common.h"
namespace tvm {
namespace contrib {
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -22,8 +22,8 @@
* \file Use external cudnn utils function
*/
#ifndef TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#define TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#ifndef TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#define TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#include <dmlc/logging.h>
......@@ -67,4 +67,4 @@ struct CuBlasThreadEntry {
} // namespace contrib
} // namespace tvm
#endif // TVM_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
#endif // TVM_RUNTIME_CONTRIB_CUBLAS_CUBLAS_UTILS_H_
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function
*/
#include <tvm/runtime/registry.h>
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function
*/
#include "cudnn_utils.h"
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,17 +18,16 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external cudnn utils function
*/
#ifndef TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_
#define TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_
#ifndef TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
#define TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
#include <dmlc/logging.h>
#include <cudnn.h>
#include <tvm/runtime/device_api.h>
#include "../../runtime/cuda/cuda_common.h"
#include "../../cuda/cuda_common.h"
namespace tvm {
......@@ -90,4 +89,4 @@ struct CuDNNThreadEntry {
} // namespace contrib
} // namespace tvm
#endif // TVM_CONTRIB_CUDNN_CUDNN_UTILS_H_
#endif // TVM_RUNTIME_CONTRIB_CUDNN_CUDNN_UTILS_H_
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function
*/
#include <tvm/runtime/registry.h>
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,7 +18,6 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function
*/
#include "miopen_utils.h"
......
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -18,18 +18,17 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external miopen utils function
*/
#ifndef TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#define TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#ifndef TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#define TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#include <dmlc/logging.h>
#include <miopen/miopen.h>
#include <tvm/runtime/device_api.h>
#include <string>
#include "../../runtime/rocm/rocm_common.h"
#include "../../rocm/rocm_common.h"
namespace tvm {
namespace contrib {
......@@ -75,4 +74,4 @@ struct MIOpenThreadEntry {
} // namespace contrib
} // namespace tvm
#endif // TVM_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
#endif // TVM_RUNTIME_CONTRIB_MIOPEN_MIOPEN_UTILS_H_
......@@ -18,12 +18,11 @@
*/
/*!
* Copyright (c) 2017 by Contributors
* \file Use external mps utils function
*/
#ifndef TVM_CONTRIB_MPS_MPS_UTILS_H_
#define TVM_CONTRIB_MPS_MPS_UTILS_H_
#ifndef TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
#define TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
#import <MetalPerformanceShaders/MetalPerformanceShaders.h>
#include <dmlc/logging.h>
......@@ -32,7 +31,7 @@
#include <tvm/runtime/registry.h>
#include <tvm/runtime/util.h>
#include <vector>
#include "../../runtime/metal/metal_common.h"
#include "../../metal/metal_common.h"
namespace tvm {
namespace contrib {
......@@ -56,4 +55,4 @@ struct MetalThreadEntry {
} // namespace contrib
} // namespace tvm
#endif // TVM_CONTRIB_MPS_MPS_UTILS_H_
#endif // TVM_RUNTIME_CONTRIB_MPS_MPS_UTILS_H_
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -21,8 +21,8 @@
* Copyright (c) 2017 by Contributors
* \file Use external nnpack library call.
*/
#ifndef TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_
#define TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_
#ifndef TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
#define TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
#include <tvm/runtime/registry.h>
#include <tvm/runtime/util.h>
#include <dmlc/thread_local.h>
......@@ -41,4 +41,4 @@ struct NNPackThreadLocalEntry {
bool NNPackConfig(uint64_t nthreads);
} // namespace contrib
} // namespace tvm
#endif // TVM_CONTRIB_NNPACK_NNPACK_UTILS_H_
#endif // TVM_RUNTIME_CONTRIB_NNPACK_NNPACK_UTILS_H_
......@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
......@@ -26,7 +26,7 @@
#include <sgx_trts.h>
#include <algorithm>
#include <cmath>
#include "../../runtime/sgx/common.h"
#include "../../sgx/common.h"
namespace tvm {
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