You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Ever-Kid (via GitHub)" <gi...@apache.org> on 2023/08/12 15:46:18 UTC
[GitHub] [tvm] Ever-Kid opened a new pull request, #15537: [CPP_RPC] export listdir for RPC
Ever-Kid opened a new pull request, #15537:
URL: https://github.com/apache/tvm/pull/15537
This PR register `tvm.rpc.server.listdir` using `ListDir` and export it in python frontend for PRC use.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] Ever-Kid commented on a diff in pull request #15537: [CPP_RPC] export listdir for RPC
Posted by "Ever-Kid (via GitHub)" <gi...@apache.org>.
Ever-Kid commented on code in PR #15537:
URL: https://github.com/apache/tvm/pull/15537#discussion_r1295758812
##########
apps/cpp_rpc/rpc_env.cc:
##########
@@ -72,6 +72,13 @@ namespace runtime {
*/
void CleanDir(const std::string& dirname);
+/*!
+ * \brief ListDir get the list of files in a directory
+ * \param dirname The root directory name
+ * \return vector Files in directory.
+ */
+std::vector<std::string> ListDir(const std::string& dirname);
Review Comment:
already coded downside the same file
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] wrongtest-intellif commented on a diff in pull request #15537: [CPP_RPC] export listdir for RPC
Posted by "wrongtest-intellif (via GitHub)" <gi...@apache.org>.
wrongtest-intellif commented on code in PR #15537:
URL: https://github.com/apache/tvm/pull/15537#discussion_r1295723229
##########
python/tvm/rpc/client.py:
##########
@@ -145,6 +145,18 @@ def remove(self, path):
self._remote_funcs["remove"] = self.get_function("tvm.rpc.server.remove")
self._remote_funcs["remove"](path)
+ def listdir(self, path):
+ """ls files from remote temp folder.
+
+ Parameters
+ ----------
+ path: str
+ The relative location to remote temp folder.
Review Comment:
It would be great to describe the return type and split token.
##########
apps/cpp_rpc/rpc_env.cc:
##########
@@ -72,6 +72,13 @@ namespace runtime {
*/
void CleanDir(const std::string& dirname);
+/*!
+ * \brief ListDir get the list of files in a directory
+ * \param dirname The root directory name
+ * \return vector Files in directory.
+ */
+std::vector<std::string> ListDir(const std::string& dirname);
Review Comment:
Is the implementation missing?
##########
apps/cpp_rpc/rpc_env.cc:
##########
@@ -123,6 +130,15 @@ RPCEnv::RPCEnv(const std::string& wd) {
*rv = this->GetPath(args[0]);
});
+ TVM_REGISTER_GLOBAL("tvm.rpc.server.listdir").set_body([this](TVMArgs args, TVMRetValue* rv) {
+ std::string dir = this->GetPath(args[0]);
+ std::string ret;
+ for (auto d : ListDir(dir)) {
+ ret.append(d.append(","));
Review Comment:
Could we use ostringstream here?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] tvm-bot commented on pull request #15537: [CPP_RPC] export listdir for RPC
Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15537:
URL: https://github.com/apache/tvm/pull/15537#issuecomment-1675971260
<!---bot-comment-->
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
<!--bot-comment-ccs-start-->
* No users to tag found in teams: `cpp_rpc` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
<sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] quic-sanirudh merged pull request #15537: [CPP_RPC] export listdir for RPC
Posted by "quic-sanirudh (via GitHub)" <gi...@apache.org>.
quic-sanirudh merged PR #15537:
URL: https://github.com/apache/tvm/pull/15537
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org