Skip to content

Commit

Permalink
[src] Small fix in test code, avoid spurious failure (#2978)
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey committed Jan 9, 2019
1 parent 37d6950 commit a6aa269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nnet3/nnet-compile-utils-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void UnitTestSplitLocationsBackward(bool verbose) {
num_locations : max_generated_submat_list_size;
submat_lists[i].reserve(num_locations);
for (int32 j = 0; j < num_locations; j++) {
if (j <= min_num_kaddrows)
if (j <= min_num_kaddrows && j < num_submat_indexes)
// since we need min_num_kaddrows in the split_lists we ensure that
// we add a pair with the same first element in all the submat_lists
submat_lists[i].push_back(std::make_pair(submat_indexes[j],
Expand Down

0 comments on commit a6aa269

Please sign in to comment.