[CPP_RPC] Implement tracker into the tvm_rpc utility#19830
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements a C++ RPC Tracker for the TVM RPC application. It introduces the RPCTracker and PriorityScheduler classes, adds command-line support for starting a tracker via ./tvm_rpc tracker, and extends socket utilities in src/support/socket.h to retrieve remote IP addresses. There are no review comments, so I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
0f219b1 to
53d1997
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a C++ RPC Tracker implementation for TVM, adding command-line support to start the tracker and extending socket utilities with remote IP retrieval. The code review identified several critical issues in the new tracker implementation, including exception safety risks and use-after-move bugs in connection handling, scheduling blocks caused by failed callbacks, inverted socket state checks, unhandled socket binding failures, and potential undefined behavior from uninitialized memory in socket utilities.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks @cbalint13 ! i feel this direction starts to increase the complexity as we bring in more variants. One original motivation of the server is that some env may not have python env, while tracker we do not have the concern. Having a single implementation helps the abilty to maintain while reduces overall complexity of project. So personally i think such implementation would be better stay off tree. |
| main.cc | ||
| rpc_env.cc | ||
| rpc_server.cc | ||
| rpc_tracker.cc |
There was a problem hiding this comment.
given tracker is somethng that do not have concern of portability(as it usually runs on a server with python), i think it is better to limit the on-tree implementation to python only
There was a problem hiding this comment.
@tqchen
Yes indeed, my goal here was to be a stand-alone thing, so it can run on edge/small device.
Embedding it into the existing tvm_rpc makes it light-weight & handy and also runs cross platform.
It is ok, I leave in Draft (closed) here, so if any user find useful can pick it up. My thought was:
|
Implements the tracker service into the existing
tvm_cpptool.This is a standalone & portable alternative to the current python only
tvm.exec.rpc_trackercounterpart.Implementation details
Brief usage:
Live example: