-
Notifications
You must be signed in to change notification settings - Fork 0
/
tvm_runtime_pack.cc
64 lines (56 loc) · 2.39 KB
/
tvm_runtime_pack.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*!
* \brief This is an all in one TVM runtime file.
*
* You only have to use this file to compile libtvm_runtime to
* include in your project.
*
* - Copy this file into your project which depends on tvm runtime.
* - Compile with -std=c++11
* - Add the following include path
* - /path/to/tvm/include/
* - /path/to/tvm/dmlc-core/include/
* - /path/to/tvm/dlpack/include/
* - Add -lpthread -ldl to the linked library.
* - You are good to go.
* - See the Makefile in the same folder for example.
*
* The include files here are presented with relative path
* You need to remember to change it to point to the right file.
*
*/
#include "nnvm/tvm/src/runtime/c_runtime_api.cc"
#include "nnvm/tvm/src/runtime/cpu_device_api.cc"
#include "nnvm/tvm/src/runtime/workspace_pool.cc"
#include "nnvm/tvm/src/runtime/module_util.cc"
#include "nnvm/tvm/src/runtime/module.cc"
#include "nnvm/tvm/src/runtime/registry.cc"
#include "nnvm/tvm/src/runtime/file_util.cc"
#include "nnvm/tvm/src/runtime/threading_backend.cc"
#include "nnvm/tvm/src/runtime/thread_pool.cc"
#include "nnvm/tvm/src/runtime/ndarray.cc"
// NOTE: all the files after this are optional modules
// that you can include remove, depending on how much feature you use.
// Likely we only need to enable one of the following
// If you use Module::Load, use dso_module
// For system packed library, use system_lib_module
#include "nnvm/tvm/src/runtime/dso_module.cc"
#include "nnvm/tvm/src/runtime/system_lib_module.cc"
// Graph runtime
#include "nnvm/tvm/src/runtime/graph/graph_runtime.cc"
// Uncomment the following lines to enable RPC
// #include "nnvm/tvm/src/runtime/rpc/rpc_session.cc"
// #include "nnvm/tvm/src/runtime/rpc/rpc_event_impl.cc"
// #include "nnvm/tvm/src/runtime/rpc/rpc_server_env.cc"
// These macros enables the device API when uncommented.
#define TVM_CUDA_RUNTIME 0
#define TVM_METAL_RUNTIME 0
#define TVM_OPENCL_RUNTIME 0
// Uncomment the following lines to enable Metal
// #include "nnvm/tvm/src/runtime/metal/metal_device_api.mm"
// #include "nnvm/tvm/src/runtime/metal/metal_module.mm"
// Uncomment the following lines to enable CUDA
// #include "nnvm/tvm/src/runtime/cuda/cuda_device_api.cc"
// #include "nnvm/tvm/src/runtime/cuda/cuda_module.cc"
// Uncomment the following lines to enable OpenCL
// #include "nnvm/tvm/src/runtime/opencl/opencl_device_api.cc"
// #include "nnvm/tvm/src/runtime/opencl/opencl_module.cc"