@@ -198,7 +198,7 @@ bool ShapeOfRel(const Array<Type>& types,
198198 int num_inputs,
199199 const Attrs& attrs,
200200 const TypeReporter& reporter) {
201- CHECK (num_inputs == 1 );
201+ CHECK_EQ (num_inputs, 1 );
202202 auto tt = types[0 ].as <TensorTypeNode>();
203203 CHECK (tt != nullptr );
204204 const auto * param = attrs.as <ShapeOfAttrs>();
@@ -212,18 +212,18 @@ Array<Tensor> ShapeOfCompute(const Attrs& attrs,
212212 const Array<Tensor>& inputs,
213213 const Type& out_type,
214214 const Target& target) {
215- CHECK (inputs.size () == 1 );
216- const auto * param = attrs.as <ShapeOfAttrs>();
217- CHECK (param != nullptr );
218- return {topi::shape (inputs[0 ], param->dtype )};
215+ CHECK_EQ (inputs.size (), 1 );
216+ const auto * param = attrs.as <ShapeOfAttrs>();
217+ CHECK (param != nullptr );
218+ return {topi::shape (inputs[0 ], param->dtype )};
219219}
220220
221221TVM_REGISTER_API (" relay.op._make.shape_of" )
222222.set_body_typed<Expr(Expr, DataType)>([](Expr data, DataType dtype) {
223- auto attrs = make_node<ShapeOfAttrs>();
224- attrs->dtype = dtype;
225- static const Op& op = Op::Get (" shape_of" );
226- return CallNode::make (op, {data}, Attrs (attrs), {});
223+ auto attrs = make_node<ShapeOfAttrs>();
224+ attrs->dtype = dtype;
225+ static const Op& op = Op::Get (" shape_of" );
226+ return CallNode::make (op, {data}, Attrs (attrs), {});
227227});
228228
229229RELAY_REGISTER_OP (" shape_of" )
0 commit comments