Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix a bug in test core.
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da committed Dec 9, 2017
1 parent 7748180 commit 53eec60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/cpp/include/test_core_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ class CoreOpExecutor : public test::op::OperatorDataInitializer<DType>
// Set up forward
attrs_ = ParseAttrs(op_, args);

const int num_inputs = op_->num_inputs;
int num_inputs = op_->num_inputs;
if (op_->get_num_inputs)
num_inputs = op_->get_num_inputs(attrs_);

if (!inputs.empty()) {
CHECK_EQ(inputs.size(), static_cast<size_t>(num_inputs));
Expand Down

0 comments on commit 53eec60

Please sign in to comment.