diff --git a/CMakeLists.txt b/CMakeLists.txt index c6937a5546aa..1389cf670aa9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ file(GLOB RUNTIME_CUDA_SRCS src/runtime/cuda/*.cc) file(GLOB RUNTIME_OPENCL_SRCS src/runtime/opencl/*.cc) file(GLOB RUNTIME_METAL_SRCS src/runtime/metal/*.mm) file(GLOB RUNTIME_RPC_SRCS src/runtime/rpc/*.cc) +file(GLOB RUNTIME_GRAPH_SRCS src/runtime/graph/*.cc) if(USE_CUDA) find_package(CUDA) @@ -149,6 +150,11 @@ if(USE_RPC) list(APPEND RUNTIME_SRCS ${RUNTIME_RPC_SRCS}) endif(USE_RPC) +if(USE_GRAPH_RUNTIME) + message(STATUS "Build with Graph runtime support...") + list(APPEND RUNTIME_SRCS ${RUNTIME_GRAPH_SRCS}) +endif(USE_GRAPH_RUNTIME) + if(USE_LLVM) find_package(LLVM CONFIG REQUIRED) include_directories(${LLVM_INCLUDE_DIRS}) diff --git a/apps/android_rpc/app/src/main/jni/tvm_runtime.h b/apps/android_rpc/app/src/main/jni/tvm_runtime.h index a66eaf5724b6..fc384a8fcd72 100644 --- a/apps/android_rpc/app/src/main/jni/tvm_runtime.h +++ b/apps/android_rpc/app/src/main/jni/tvm_runtime.h @@ -17,10 +17,13 @@ #include "../src/runtime/dso_module.cc" #include "../src/runtime/rpc/rpc_session.cc" #include "../src/runtime/rpc/rpc_event_impl.cc" -#include "../src/runtime/rpc/rpc_server_env.cc" +#include "../src/runtime/rpc/rpc_server_env.cc" #include "../src/runtime/rpc/rpc_module.cc" #include "../src/runtime/rpc/rpc_socket_impl.cc" #include "../src/runtime/thread_pool.cc" + +#include "../src/runtime/graph/graph_runtime.cc" + #ifdef TVM_OPENCL_RUNTIME #include "../src/runtime/opencl/opencl_device_api.cc" #include "../src/runtime/opencl/opencl_module.cc" diff --git a/apps/ios_rpc/tvmrpc/TVMRuntime.mm b/apps/ios_rpc/tvmrpc/TVMRuntime.mm index c939d9b26d2c..881c82ddb05e 100644 --- a/apps/ios_rpc/tvmrpc/TVMRuntime.mm +++ b/apps/ios_rpc/tvmrpc/TVMRuntime.mm @@ -19,6 +19,8 @@ #include "../../src/runtime/rpc/rpc_server_env.cc" #include "../../src/runtime/rpc/rpc_socket_impl.cc" #include "../../src/runtime/rpc/rpc_module.cc" +// Graph runtime +#include "../../src/runtime/graph/graph_runtime.cc" // Metal #include "../../src/runtime/metal/metal_module.mm" #include "../../src/runtime/metal/metal_device_api.mm" diff --git a/docs/api/python/contrib.rst b/docs/api/python/contrib.rst index def68e390dd9..ed04230deb8d 100644 --- a/docs/api/python/contrib.rst +++ b/docs/api/python/contrib.rst @@ -22,9 +22,9 @@ tvm.contrib.rpc .. automodule:: tvm.contrib.rpc :members: -tvm.contrib.graph -~~~~~~~~~~~~~~~~~ -.. automodule:: tvm.contrib.graph +tvm.contrib.graph_runtime +~~~~~~~~~~~~~~~~~~~~~~~~~ +.. automodule:: tvm.contrib.graph_runtime :members: tvm.contrib.util diff --git a/web/web_runtime.cc b/web/web_runtime.cc index 09fc30f9a0b5..56538733025b 100644 --- a/web/web_runtime.cc +++ b/web/web_runtime.cc @@ -17,6 +17,7 @@ #include "../src/runtime/rpc/rpc_session.cc" #include "../src/runtime/rpc/rpc_event_impl.cc" #include "../src/runtime/rpc/rpc_server_env.cc" +#include "../src/runtime/graph/graph_runtime.cc" namespace tvm { namespace contrib {