[Hexagon] Adjust RPC read buffer size from python #11022
Conversation
89b7fc1 to
68d0935
Compare
| return &g_hexagon_rpc_server; | ||
| static tvm::runtime::hexagon::HexagonRPCServer* g_hexagon_rpc_server; | ||
| tvm::runtime::hexagon::HexagonRPCServer* get_hexagon_rpc_server( | ||
| uint32_t rpc_receive_buff_size_bytes = TVM_HEXAGON_RPC_BUFF_DEFAULT_SIZE_BYTES) { |
There was a problem hiding this comment.
How about we set the default value to 0, delete the TVM_HEXAGON_RPC_BUFF_DEFAULT_SIZE_BYTES define, and then CHECK that rpc_receive_buff_size_bytes is non-zero when g_hexagon_rpc_server is null?
| @@ -1311,6 +1311,8 @@ detail::Optional<HEXAPI_Nullptr> SimulatorRPCChannel::to_nullptr(const detail::M | |||
|
|
|||
| TVM_REGISTER_GLOBAL("tvm.contrib.hexagon.create_hexagon_session") | |||
There was a problem hiding this comment.
Can we include a test that we expect to fail when the stack size is too small, and expect to pass when the stack size is set larger?
There was a problem hiding this comment.
The simulator ignores the stack size at the moment.
|
Not a blocker, but is there a reason not to use |
|
@kparzysz-quic I don't see a reason. Would std::stringbuf be slower? |
Probably, but it wouldn't affect model performance, since the only time it would run would be during the actual RPC communication. If you want you can consider it in another PR. |
* added buffer size * remove default size
This PR changes RPC read buffer size to be adjustable from python size by registering
initfunction for FastRPC.@csullivan @kparzysz-quic