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



##########
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:
       how about add one simple code comment to indicate users if failed, 
should make sure the directory is writable and also consider to change `base_` 
to `/data/local/tmp/rpc`. This could help users find one solution more quickly




-- 
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:
us...@infra.apache.org


Reply via email to