tkonolige commented on a change in pull request #7435:
URL: https://github.com/apache/tvm/pull/7435#discussion_r578599975
##########
File path: src/relay/op/nn/sparse.cc
##########
@@ -202,9 +202,10 @@ bool SparseAddRel(const Array<Type>& types, int
num_inputs, const Attrs& attrs,
ICHECK_EQ(types.size(), 5);
const auto* dense_data = types[0].as<TensorTypeNode>();
const auto* sparse_data = types[1].as<TensorTypeNode>();
- ICHECK_EQ(sparse_data->shape.size(), 1);
+ ICHECK(reporter->Assert(sparse_data->dtype == dense_data->dtype));
+ ICHECK(reporter->Assert(sparse_data->shape.size() == 1));
const auto* sparse_indices = types[2].as<TensorTypeNode>();
- ICHECK_EQ(sparse_indices->shape.size(), 1);
+ ICHECK(reporter->Assert(sparse_indices->shape.size() == 1));
Review comment:
You don't need to wrap this in an ICHECK.
----------------------------------------------------------------
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]