From 5f44ba962804132c7e2de6a4439d5ae00656c9af Mon Sep 17 00:00:00 2001 From: weiliangweiliang <617878975@qq.com> Date: Fri, 10 Apr 2020 22:47:19 +0800 Subject: [PATCH] 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 908ba87a8c52..d5e1d2efd8e6 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 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)); }