You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/15 16:57:01 UTC

[GitHub] [tvm] mehrdadh opened a new pull request, #11022: [Hexagon] Adjust RPC read buffer size from python

mehrdadh opened a new pull request, #11022:
URL: https://github.com/apache/tvm/pull/11022

   This PR changes RPC read buffer size to be adjustable from python size by registering `init` function for FastRPC.
   
   @csullivan @kparzysz-quic 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh commented on a diff in pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
mehrdadh commented on code in PR #11022:
URL: https://github.com/apache/tvm/pull/11022#discussion_r852211320


##########
src/runtime/hexagon/rpc/hexagon/rpc_server.cc:
##########
@@ -196,10 +195,16 @@ class HexagonRPCServer {
 }  // namespace tvm
 
 namespace {
-tvm::runtime::hexagon::HexagonRPCServer* get_hexagon_rpc_server() {
-  static tvm::runtime::hexagon::HexagonRPCServer g_hexagon_rpc_server(
-      new uint8_t[TVM_HEXAGON_RPC_BUFF_SIZE_BYTES], TVM_HEXAGON_RPC_BUFF_SIZE_BYTES);
-  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) {

Review Comment:
   done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] csullivan commented on a diff in pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
csullivan commented on code in PR #11022:
URL: https://github.com/apache/tvm/pull/11022#discussion_r851551944


##########
src/runtime/hexagon/rpc/simulator/session.cc:
##########
@@ -1311,6 +1311,8 @@ detail::Optional<HEXAPI_Nullptr> SimulatorRPCChannel::to_nullptr(const detail::M
 
 TVM_REGISTER_GLOBAL("tvm.contrib.hexagon.create_hexagon_session")

Review 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?



##########
src/runtime/hexagon/rpc/hexagon/rpc_server.cc:
##########
@@ -196,10 +195,16 @@ class HexagonRPCServer {
 }  // namespace tvm
 
 namespace {
-tvm::runtime::hexagon::HexagonRPCServer* get_hexagon_rpc_server() {
-  static tvm::runtime::hexagon::HexagonRPCServer g_hexagon_rpc_server(
-      new uint8_t[TVM_HEXAGON_RPC_BUFF_SIZE_BYTES], TVM_HEXAGON_RPC_BUFF_SIZE_BYTES);
-  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) {

Review 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?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on a diff in pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on code in PR #11022:
URL: https://github.com/apache/tvm/pull/11022#discussion_r851555675


##########
src/runtime/hexagon/rpc/simulator/session.cc:
##########
@@ -1311,6 +1311,8 @@ detail::Optional<HEXAPI_Nullptr> SimulatorRPCChannel::to_nullptr(const detail::M
 
 TVM_REGISTER_GLOBAL("tvm.contrib.hexagon.create_hexagon_session")

Review Comment:
   The simulator ignores the stack size at the moment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on a diff in pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on code in PR #11022:
URL: https://github.com/apache/tvm/pull/11022#discussion_r852415525


##########
src/runtime/hexagon/rpc/simulator/session.cc:
##########
@@ -1311,6 +1311,8 @@ detail::Optional<HEXAPI_Nullptr> SimulatorRPCChannel::to_nullptr(const detail::M
 
 TVM_REGISTER_GLOBAL("tvm.contrib.hexagon.create_hexagon_session")

Review Comment:
   https://github.com/apache/tvm/pull/11046



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh commented on pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
mehrdadh commented on PR #11022:
URL: https://github.com/apache/tvm/pull/11022#issuecomment-1101786592

   @kparzysz-quic I don't see a reason. Would std::stringbuf be slower?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] areusch merged pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
areusch merged PR #11022:
URL: https://github.com/apache/tvm/pull/11022


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on PR #11022:
URL: https://github.com/apache/tvm/pull/11022#issuecomment-1101770782

   Is there a reason not to use `std::stringbuf` instead of the preallocated array? (the code for simulator does that)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on pull request #11022: [Hexagon] Adjust RPC read buffer size from python

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on PR #11022:
URL: https://github.com/apache/tvm/pull/11022#issuecomment-1101806589

   > @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org