You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "junrushao (via GitHub)" <gi...@apache.org> on 2023/08/28 07:33:46 UTC

[GitHub] [tvm] junrushao opened a new pull request, #15634: [Disco] Support ShapeTuple in Disco Protocol

junrushao opened a new pull request, #15634:
URL: https://github.com/apache/tvm/pull/15634

   ShapeTuple is an essential item used in Relax stack as the runtime representation of shapes. It is also used as a current workaround to represent integers (1-d shape) given standalone non-constant integers are currently absent in Relax.
   
   This PR introduces formal support for ShapeTuple in Disco's communication protocol based on the recent enhancement of TVM RPC system to support TVM Objects: https://github.com/apache/tvm/pull/15631.


-- 
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] junrushao commented on pull request #15634: [Disco] Support ShapeTuple in Disco Protocol

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao commented on PR #15634:
URL: https://github.com/apache/tvm/pull/15634#issuecomment-1695183053

   CC @jinhongyii @LeshengJin @tqchen


-- 
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] junrushao commented on a diff in pull request #15634: [Disco] Support ShapeTuple in Disco Protocol

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao commented on code in PR #15634:
URL: https://github.com/apache/tvm/pull/15634#discussion_r1307612173


##########
src/runtime/disco/threaded_session.cc:
##########
@@ -146,13 +152,17 @@ class DiscoThreadedMessageQueue : public dmlc::Stream {
       this->Read<int64_t>(&dref->reg_id);
       dref->session = Session{nullptr};
       result = ObjectRef(std::move(dref));
+    } else if (type_index == TypeIndex::kRuntimeString) {
+      uint64_t size = 0;

Review Comment:
   I'm not sure if my understanding is correct here. In `WriteObj`, we write the string's actual length to dmlc::Stream, and in `ReadObj` here, we create an `std::string` of length `len + 1`, and update its first `len` characters. I suppose in either case, the terminal character is not included.



-- 
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] tqchen commented on a diff in pull request #15634: [Disco] Support ShapeTuple in Disco Protocol

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on code in PR #15634:
URL: https://github.com/apache/tvm/pull/15634#discussion_r1307470688


##########
src/runtime/disco/threaded_session.cc:
##########
@@ -146,13 +152,17 @@ class DiscoThreadedMessageQueue : public dmlc::Stream {
       this->Read<int64_t>(&dref->reg_id);
       dref->session = Session{nullptr};
       result = ObjectRef(std::move(dref));
+    } else if (type_index == TypeIndex::kRuntimeString) {
+      uint64_t size = 0;

Review Comment:
   To make things consistent, it is helpful to pass in string length, instead of len+1(that includes termination string)



-- 
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] tqchen commented on a diff in pull request #15634: [Disco] Support ShapeTuple in Disco Protocol

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on code in PR #15634:
URL: https://github.com/apache/tvm/pull/15634#discussion_r1307702722


##########
src/runtime/disco/threaded_session.cc:
##########
@@ -146,13 +152,17 @@ class DiscoThreadedMessageQueue : public dmlc::Stream {
       this->Read<int64_t>(&dref->reg_id);
       dref->session = Session{nullptr};
       result = ObjectRef(std::move(dref));
+    } else if (type_index == TypeIndex::kRuntimeString) {
+      uint64_t size = 0;

Review Comment:
   i misread the code. no questions for now



-- 
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] junrushao merged pull request #15634: [Disco] Support ShapeTuple in Disco Protocol

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao merged PR #15634:
URL: https://github.com/apache/tvm/pull/15634


-- 
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