You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ju...@apache.org on 2023/09/03 06:12:57 UTC

[tvm] branch unity updated: [Unity][Disco] Correct document for CopyFromWorker0 and CopyToWorker0 (#15660)

This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new 935c91314a [Unity][Disco] Correct document for CopyFromWorker0 and CopyToWorker0 (#15660)
935c91314a is described below

commit 935c91314a6ea7489ec5a0a3d732dbc5e5ce55b4
Author: Hongyi Jin <32...@qq.com>
AuthorDate: Sat Sep 2 23:12:52 2023 -0700

    [Unity][Disco] Correct document for CopyFromWorker0 and CopyToWorker0 (#15660)
    
    fix document
---
 include/tvm/runtime/disco/session.h | 4 ++--
 python/tvm/runtime/disco/session.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/tvm/runtime/disco/session.h b/include/tvm/runtime/disco/session.h
index 0346fc79fc..6ee293bfa5 100644
--- a/include/tvm/runtime/disco/session.h
+++ b/include/tvm/runtime/disco/session.h
@@ -185,13 +185,13 @@ class SessionObj : public Object {
   /*! \brief Get a global functions on workers. */
   virtual DRef GetGlobalFunc(const std::string& name) = 0;
   /*!
-   * \brief Copy the controler-side NDArray to worker-0
+   * \brief Copy an NDArray from worker-0 to the controler-side NDArray
    * \param host_array The array to be copied to worker-0
    * \param remote_array The NDArray on worker-0
    */
   virtual void CopyFromWorker0(const NDArray& host_array, const DRef& remote_array) = 0;
   /*!
-   * \brief Copy an NDArray from worker-0 to the controler-side NDArray
+   * \brief Copy the controler-side NDArray to worker-0
    * \param host_array The array to be copied to worker-0
    * \param remote_array The NDArray on worker-0
    */
diff --git a/python/tvm/runtime/disco/session.py b/python/tvm/runtime/disco/session.py
index 21c38a41ac..6205a767db 100644
--- a/python/tvm/runtime/disco/session.py
+++ b/python/tvm/runtime/disco/session.py
@@ -203,7 +203,7 @@ class Session(Object):
         return self._sync_worker(0)
 
     def copy_from_worker_0(self, host_array: NDArray, remote_array: DRef) -> None:
-        """Copy the controller-side NDArray to worker-0.
+        """Copy an NDArray from worker-0 to the controller-side NDArray.
 
         Parameters
         ----------
@@ -215,7 +215,7 @@ class Session(Object):
         return _ffi_api.SessionCopyFromWorker0(self, host_array, remote_array)  # type: ignore # pylint: disable=no-member
 
     def copy_to_worker_0(self, host_array: NDArray, remote_array: DRef) -> None:
-        """Copy an NDArray from worker-0 to the controller-side NDArray.
+        """Copy the controller-side NDArray to worker-0.
 
         Parameters
         ----------