From f2af1ef154f973b78560c0ba82f9b2f2ce30079f Mon Sep 17 00:00:00 2001 From: Mercy Date: Wed, 28 Nov 2018 18:26:55 -0800 Subject: [PATCH] add comments --- src/relay/pass/alter_op_layout.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/relay/pass/alter_op_layout.cc b/src/relay/pass/alter_op_layout.cc index 7e34864fefc67..5c4475259086c 100644 --- a/src/relay/pass/alter_op_layout.cc +++ b/src/relay/pass/alter_op_layout.cc @@ -114,12 +114,13 @@ class LayoutAlternatedExprNode : public TempExprNode { RELAY_DEFINE_NODE_REF(LayoutAlternatedExpr, LayoutAlternatedExprNode, TempExpr); // Call registered FInferCorrectLayout of an op. -// Return inferred_input_layout, inferred_output_layout, success +// Parameters are the same as the parameters for FInferCorrectLayout +// Returns inferred_input_layout, inferred_output_layout, success std::tuple, Array, bool> CallInfer( const Call& call, const Array& new_in_layouts, const Array& old_in_layouts, - const Array> &old_in_shapes) { + const Array > &old_in_shapes) { static auto finfer_layout = Op::GetAttr("FInferCorrectLayout"); Op op = Downcast(call->op); @@ -143,7 +144,7 @@ std::tuple, Array, bool> CallInfer( } // Call registered FTVMAlterOpLayout of an op -// Return altered expression +// Returns the altered expression Call CallAlter(const Call& ref_call, const std::vector& new_args) { static auto falter_layout = Op::GetAttr("FTVMAlterOpLayout");