Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ list(APPEND COMPILER_SRCS "src/target/datatype/myfloat/myfloat.cc")
tvm_file_glob(GLOB RUNTIME_SRCS
src/runtime/*.cc
src/runtime/vm/*.cc
src/runtime/minrpc/*.cc
)

if(BUILD_FOR_HEXAGON)
Expand Down
1 change: 0 additions & 1 deletion python/tvm/micro/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def __enter__(self):
int(timeouts.session_start_timeout_sec * 1e6),
int(timeouts.session_established_timeout_sec * 1e6),
self._cleanup,
False,
)
)
self.device = self._rpc.cpu(0)
Expand Down
13 changes: 4 additions & 9 deletions python/tvm/rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,7 @@ def request_and_run(self, key, func, priority=1, session_timeout=0, max_retry=2)
)


def connect(
url, port, key="", session_timeout=0, session_constructor_args=None, enable_logging=False
):
def connect(url, port, key="", session_timeout=0, session_constructor_args=None):
"""Connect to RPC Server

Parameters
Expand All @@ -485,9 +483,6 @@ def connect(
The first element of the list is always a string specifying the name of
the session constructor, the following args are the positional args to that function.

enable_logging: boolean
flag to enable/disable logging. Logging is disabled by default.

Returns
-------
sess : RPCSession
Expand All @@ -508,9 +503,9 @@ def connect(
.. code-block:: python

client_via_proxy = rpc.connect(
proxy_server_url, proxy_server_port, proxy_server_key, enable_logging
proxy_server_url, proxy_server_port, proxy_server_key,
session_constructor_args=[
"rpc.Connect", internal_url, internal_port, internal_key, internal_logging])
"rpc.Connect", internal_url, internal_port, internal_key])

"""
try:
Expand All @@ -519,7 +514,7 @@ def connect(
session_constructor_args = session_constructor_args if session_constructor_args else []
if not isinstance(session_constructor_args, (list, tuple)):
raise TypeError("Expect the session constructor to be a list or tuple")
sess = _ffi_api.Connect(url, port, key, enable_logging, *session_constructor_args)
sess = _ffi_api.Connect(url, port, key, *session_constructor_args)
except NameError:
raise RuntimeError("Please compile with USE_RPC=1")
return RPCSession(sess)
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/crt/microtvm_rpc_server/rpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class MicroRPCServer {
} // namespace runtime
} // namespace tvm

void* operator new[](size_t count, void* ptr) noexcept { return ptr; }

extern "C" {

static microtvm_rpc_server_t g_rpc_server = nullptr;
Expand Down
8 changes: 0 additions & 8 deletions src/runtime/micro/micro_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include "../../support/str_escape.h"
#include "../rpc/rpc_channel.h"
#include "../rpc/rpc_channel_logger.h"
#include "../rpc/rpc_endpoint.h"
#include "../rpc/rpc_session.h"
#include "crt_config.h"
Expand Down Expand Up @@ -405,13 +404,6 @@ TVM_REGISTER_GLOBAL("micro._rpc_connect").set_body([](TVMArgs args, TVMRetValue*
throw std::runtime_error(ss.str());
}
std::unique_ptr<RPCChannel> channel(micro_channel);
bool enable_logging = false;
if (args.num_args > 7) {
enable_logging = args[7];
}
if (enable_logging) {
channel.reset(new RPCChannelLogging(std::move(channel)));
}
auto ep = RPCEndpoint::Create(std::move(channel), args[0], "", args[6]);
auto sess = CreateClientSession(ep);
*rv = CreateRPCSessionModule(sess);
Expand Down
93 changes: 0 additions & 93 deletions src/runtime/minrpc/minrpc_interfaces.h

This file was deleted.

Loading