Skip to content

Commit ff7efe7

Browse files
authored
Revert "Implemented rpc logging (#10967)" (#11227)
This reverts commit aa3bcd9, because it fails on Windows CI as reported in issue #11220. PR #11223 tries to address it but is is failing in the regular CI with testing issue on Hexagon.
1 parent eae836c commit ff7efe7

File tree

14 files changed

+275
-1474
lines changed

14 files changed

+275
-1474
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ list(APPEND COMPILER_SRCS "src/target/datatype/myfloat/myfloat.cc")
318318
tvm_file_glob(GLOB RUNTIME_SRCS
319319
src/runtime/*.cc
320320
src/runtime/vm/*.cc
321-
src/runtime/minrpc/*.cc
322321
)
323322

324323
if(BUILD_FOR_HEXAGON)

python/tvm/micro/session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def __enter__(self):
133133
int(timeouts.session_start_timeout_sec * 1e6),
134134
int(timeouts.session_established_timeout_sec * 1e6),
135135
self._cleanup,
136-
False,
137136
)
138137
)
139138
self.device = self._rpc.cpu(0)

python/tvm/rpc/client.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,7 @@ def request_and_run(self, key, func, priority=1, session_timeout=0, max_retry=2)
459459
)
460460

461461

462-
def connect(
463-
url, port, key="", session_timeout=0, session_constructor_args=None, enable_logging=False
464-
):
462+
def connect(url, port, key="", session_timeout=0, session_constructor_args=None):
465463
"""Connect to RPC Server
466464
467465
Parameters
@@ -485,9 +483,6 @@ def connect(
485483
The first element of the list is always a string specifying the name of
486484
the session constructor, the following args are the positional args to that function.
487485
488-
enable_logging: boolean
489-
flag to enable/disable logging. Logging is disabled by default.
490-
491486
Returns
492487
-------
493488
sess : RPCSession
@@ -508,9 +503,9 @@ def connect(
508503
.. code-block:: python
509504
510505
client_via_proxy = rpc.connect(
511-
proxy_server_url, proxy_server_port, proxy_server_key, enable_logging
506+
proxy_server_url, proxy_server_port, proxy_server_key,
512507
session_constructor_args=[
513-
"rpc.Connect", internal_url, internal_port, internal_key, internal_logging])
508+
"rpc.Connect", internal_url, internal_port, internal_key])
514509
515510
"""
516511
try:
@@ -519,7 +514,7 @@ def connect(
519514
session_constructor_args = session_constructor_args if session_constructor_args else []
520515
if not isinstance(session_constructor_args, (list, tuple)):
521516
raise TypeError("Expect the session constructor to be a list or tuple")
522-
sess = _ffi_api.Connect(url, port, key, enable_logging, *session_constructor_args)
517+
sess = _ffi_api.Connect(url, port, key, *session_constructor_args)
523518
except NameError:
524519
raise RuntimeError("Please compile with USE_RPC=1")
525520
return RPCSession(sess)

src/runtime/crt/microtvm_rpc_server/rpc_server.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ class MicroRPCServer {
193193
} // namespace runtime
194194
} // namespace tvm
195195

196+
void* operator new[](size_t count, void* ptr) noexcept { return ptr; }
197+
196198
extern "C" {
197199

198200
static microtvm_rpc_server_t g_rpc_server = nullptr;

src/runtime/micro/micro_session.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
#include "../../support/str_escape.h"
4040
#include "../rpc/rpc_channel.h"
41-
#include "../rpc/rpc_channel_logger.h"
4241
#include "../rpc/rpc_endpoint.h"
4342
#include "../rpc/rpc_session.h"
4443
#include "crt_config.h"
@@ -405,13 +404,6 @@ TVM_REGISTER_GLOBAL("micro._rpc_connect").set_body([](TVMArgs args, TVMRetValue*
405404
throw std::runtime_error(ss.str());
406405
}
407406
std::unique_ptr<RPCChannel> channel(micro_channel);
408-
bool enable_logging = false;
409-
if (args.num_args > 7) {
410-
enable_logging = args[7];
411-
}
412-
if (enable_logging) {
413-
channel.reset(new RPCChannelLogging(std::move(channel)));
414-
}
415407
auto ep = RPCEndpoint::Create(std::move(channel), args[0], "", args[6]);
416408
auto sess = CreateClientSession(ep);
417409
*rv = CreateRPCSessionModule(sess);

src/runtime/minrpc/minrpc_interfaces.h

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)