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

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new 00014e2  Update device_annotation.cc (#5291)
00014e2 is described below

commit 00014e20c3cc077727d467a67d3498260627e4e0
Author: weiliangweiliang <[email protected]>
AuthorDate: Fri Apr 10 22:47:19 2020 +0800

    Update device_annotation.cc (#5291)
---
 src/relay/transforms/device_annotation.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/relay/transforms/device_annotation.cc 
b/src/relay/transforms/device_annotation.cc
index 908ba87..d5e1d2e 100644
--- a/src/relay/transforms/device_annotation.cc
+++ b/src/relay/transforms/device_annotation.cc
@@ -140,10 +140,10 @@ class RewriteAnnotation : public ExprMutator {
     }
   }
 
-  Expr VisitExp_(const TupleNode* op) {
+  Expr VisitExpr_(const TupleNode* op) {
     Array<Expr> fields;
     bool annotated = false;
-    for (const auto& field : fields) {
+    for (const auto& field : op->fields) {
       annotated |= NeedDeviceCopy(field.operator->(), op);
       fields.push_back(GetDeviceCopyExpr(field, op));
     }

Reply via email to