fantasyRqg commented on a change in pull request #8223:
URL: https://github.com/apache/tvm/pull/8223#discussion_r648791852



##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -95,7 +95,13 @@ RPCEnv::RPCEnv(const std::string& wd) {
     auto cmdline = fopen("/proc/self/cmdline", "r");
     fread(cwd, 1, sizeof(cwd), cmdline);
     fclose(cmdline);
-    base_ = "/data/data/" + std::string(cwd) + "/cache/rpc";
+    std::string android_base_ = "/data/data/" + std::string(cwd) +"/cache";
+    struct stat statbuf;
+    if (stat(android_base_.data(), &statbuf) == -1 || 
!S_ISDIR(statbuf.st_mode)){
+        android_base_ = ".";

Review comment:
       When current working directory is writable, Yes .
   
   Another option is force `base_` to `/data/local/tmp/rpc`. But I don't think 
this is a good choice. So I keep the original implementation .
   




-- 
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:
[email protected]


Reply via email to