-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Hexagon] Adjust RPC read buffer size from python #11022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
89b7fc1 to
68d0935
Compare
csullivan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
| .Default(none); | ||
| } | ||
|
|
||
| TVM_REGISTER_GLOBAL("tvm.contrib.hexagon.create_hexagon_session") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simulator ignores the stack size at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
csullivan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
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
* 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