comaniac commented on a change in pull request #5288: [BYOC] Refine DNNL Codegen
URL: https://github.com/apache/incubator-tvm/pull/5288#discussion_r406505777
##########
File path: src/relay/backend/contrib/dnnl/codegen.cc
##########
@@ -53,12 +53,19 @@ class CodegenDNNL : public ExprVisitor, public
CodegenCBase {
}
void VisitExpr_(const TupleGetItemNode* op) final {
- // Do nothing
+ VisitExpr(op->tuple);
+ CHECK(out_.size() > static_cast<size_t>(op->index));
+
+ // Only keep the item we want for the child node.
+ // FIXME(@comaniac): The other items should still be requried for the
primary outputs.
Review comment:
In terms of the semantic, if we generate a partition function like
`conv2d->BN->relu`, we should have a tuple output with 3 elements `(relu_out,
BN_out_1, BN_out_2)` even the rest 2 are useless. In general we should achieve
this semantic, but since no one cares the rest 2 outputs of `batch_norm` it's
fine 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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services