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/02/18 00:56:44 UTC
[GitHub] [incubator-tvm] jmorrill commented on a change in pull request
#4857: Windows Support for cpp_rpc
jmorrill commented on a change in pull request #4857: Windows Support for cpp_rpc
URL: https://github.com/apache/incubator-tvm/pull/4857#discussion_r380410740
##########
File path: apps/cpp_rpc/rpc_env.cc
##########
@@ -20,141 +20,139 @@
* \file rpc_env.cc
* \brief Server environment of the RPC.
*/
+#include <cerrno>
#include <tvm/runtime/registry.h>
-#include <errno.h>
-#ifndef _MSC_VER
-#include <sys/stat.h>
+#ifndef _WIN32
#include <dirent.h>
+#include <sys/stat.h>
#include <unistd.h>
#else
#include <Windows.h>
+#include <direct.h>
+namespace {
+ int mkdir(const char* path, int /* ignored */) { return _mkdir(path); }
+}
#endif
+#include <cstring>
#include <fstream>
-#include <vector>
#include <iostream>
#include <string>
-#include <cstring>
+#include <vector>
+#include <string>
-#include "rpc_env.h"
#include "../../src/support/util.h"
#include "../../src/runtime/file_util.h"
+#include "rpc_env.h"
+
+namespace {
+#if defined(__linux__) || defined(__ANDROID__)
+ const std::string untar_cmd = "tar -C ";
+#elif defined(_WIN32)
+ const std::string untar_cmd = "wsl tar -C ";
Review comment:
I considered some open-source C and C++ libraries, but shied away with license and time to implement reasons.
I think Python tarfile would be a good pick, especially if it comes packaged with python....as long as having python is not a burden. I would like to test the speed though, mostly around python startup time and determine what is "acceptable" or not.
As a side note, it seems you can just send a precompiled dll (no tar), by changing the build_func:
`from tvm.contrib import cc`
....
`builder=autotvm.LocalBuilder(n_parallel=18, timeout=25, build_func=cc.create_shared)`
----------------------------------------------------------------
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
With regards,
Apache Git Services