tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] FrozenGene commented on a change in pull request #5535: Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)
Date Thu, 07 May 2020 11:43:40 GMT

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



Mime
View raw message