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 2021/04/21 20:43:53 UTC

[GitHub] [tvm] tkonolige opened a new pull request #7902: [FIX,VM] Fix get_outputs on the vm with a single output

tkonolige opened a new pull request #7902:
URL: https://github.com/apache/tvm/pull/7902


   The VM uses an ADT for multiple outputs and an NDArray for a single output. The single output case was not being handled.
   
   @tmoreau89


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



[GitHub] [tvm] areusch commented on a change in pull request #7902: [FIX,VM] Fix get_outputs on the vm with a single output

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #7902:
URL: https://github.com/apache/tvm/pull/7902#discussion_r619499432



##########
File path: src/runtime/vm/vm.cc
##########
@@ -142,11 +142,21 @@ PackedFunc VirtualMachine::GetFunction(const std::string& name,
     });
   } else if (name == "get_output") {
     return TypedPackedFunc<NDArray(int64_t)>([this](int64_t index) {
-      return Downcast<NDArray>(Downcast<ADT>(this->return_register_)[index]);
+      if (this->return_register_.as<ADTObj>()) {
+        return Downcast<NDArray>(Downcast<ADT>(this->return_register_)[index]);
+      } else {
+        return Downcast<NDArray>(this->return_register_);

Review comment:
       should we assert `index == 0` or enforce some interface to make sure ppl don't think they are reading a tuple when they are not?




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



[GitHub] [tvm] areusch commented on pull request #7902: [FIX,VM] Fix get_outputs on the vm with a single output

Posted by GitBox <gi...@apache.org>.
areusch commented on pull request #7902:
URL: https://github.com/apache/tvm/pull/7902#issuecomment-832854873


   thanks @tkonolige , the PR is now merged!


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



[GitHub] [tvm] tkonolige commented on pull request #7902: [FIX,VM] Fix get_outputs on the vm with a single output

Posted by GitBox <gi...@apache.org>.
tkonolige commented on pull request #7902:
URL: https://github.com/apache/tvm/pull/7902#issuecomment-825803396


   @areusch Can you review?


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



[GitHub] [tvm] areusch merged pull request #7902: [FIX,VM] Fix get_outputs on the vm with a single output

Posted by GitBox <gi...@apache.org>.
areusch merged pull request #7902:
URL: https://github.com/apache/tvm/pull/7902


   


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