Skip to content

Commit f807866

Browse files
committed
lint
1 parent a741039 commit f807866

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/relay/op/tensor/unary.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

221221
TVM_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

229229
RELAY_REGISTER_OP("shape_of")

0 commit comments

Comments
 (0)