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 2020/05/06 23:25:03 UTC

[GitHub] [incubator-tvm] kparzysz-quic opened a new pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

kparzysz-quic opened a new pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535


   - Implement `getNextString` to break up `std::string` into words. `stringstream` just doesn't work on Android.
   - `string::find_last_of` doesn't look for the last substring, but the last character from a given string.
   - Use `SIGTERM` to terminate processes (this isn't necessary, but using `SIGKILL` is not a good practice).
   - Convert `./rpc` to a full path. When a module is uploaded and offloaded to Hexagon, the `dlopen` on Hexagon needs an absolute path (or a path without directories).


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

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



[GitHub] [incubator-tvm] FrozenGene commented on pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

Posted by GitBox <gi...@apache.org>.
FrozenGene commented on pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535#issuecomment-625612254


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

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



[GitHub] [incubator-tvm] FrozenGene commented on a change in pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

Posted by GitBox <gi...@apache.org>.
FrozenGene commented on a change in pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535#discussion_r421440050



##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -67,7 +67,12 @@ namespace {
 namespace tvm {
 namespace runtime {
 RPCEnv::RPCEnv() {
-  base_ = "./rpc";
+  char cwd[PATH_MAX];
+  if (char *rc = getcwd(cwd, sizeof(cwd))) {
+    base_ = std::string(cwd) + "/rpc";
+  } else {
+    base_ = "./rpc";
+  }

Review comment:
       This will break on Windows platform. Windows doesn't have `PATH_MAX` (is 4096) but has `MAX_PATH` (is 260). Please guard it on different macro. Or you could define one common length instead of using `PATH_MAX`. cc @jmorrill 




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

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



[GitHub] [incubator-tvm] FrozenGene commented on a change in pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

Posted by GitBox <gi...@apache.org>.
FrozenGene commented on a change in pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535#discussion_r421612526



##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -67,7 +67,12 @@ namespace {
 namespace tvm {
 namespace runtime {
 RPCEnv::RPCEnv() {
-  base_ = "./rpc";
+  char cwd[PATH_MAX];
+  if (char *rc = getcwd(cwd, sizeof(cwd))) {
+    base_ = std::string(cwd) + "/rpc";
+  } else {
+    base_ = "./rpc";
+  }

Review comment:
       Ok. Could you triger CI again? The error shouldn’t be related with your change.




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

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



[GitHub] [incubator-tvm] kparzysz-quic commented on a change in pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on a change in pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535#discussion_r421622213



##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -67,7 +67,12 @@ namespace {
 namespace tvm {
 namespace runtime {
 RPCEnv::RPCEnv() {
-  base_ = "./rpc";
+  char cwd[PATH_MAX];
+  if (char *rc = getcwd(cwd, sizeof(cwd))) {
+    base_ = std::string(cwd) + "/rpc";
+  } else {
+    base_ = "./rpc";
+  }

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.

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



[GitHub] [incubator-tvm] kparzysz-quic commented on a change in pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on a change in pull request #5535:
URL: https://github.com/apache/incubator-tvm/pull/5535#discussion_r421501402



##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -67,7 +67,12 @@ namespace {
 namespace tvm {
 namespace runtime {
 RPCEnv::RPCEnv() {
-  base_ = "./rpc";
+  char cwd[PATH_MAX];
+  if (char *rc = getcwd(cwd, sizeof(cwd))) {
+    base_ = std::string(cwd) + "/rpc";
+  } else {
+    base_ = "./rpc";
+  }

Review comment:
       I don't have a convenient way of testing it on Windows right now, so I'm just going to #ifdef it.




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

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