Fix DerefNullPtr issues raised by SDLNativeRules. (#6348)

This commit is contained in:
Pranav Sharma 2021-01-14 08:36:07 -08:00 committed by GitHub
parent 4df356d1c9
commit 5b9d993a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -272,7 +272,7 @@ void BinaryElementWiseImpl(
output_rank_or_simple_broadcast,
*lhs_padded_strides,
lhs_data,
*rhs_padded_strides,
TArray<int64_t>(), // rhs is not computed, so no need to deference rhs_padded_strides
rhs_data,
*fdm_output_strides,
output_data,
@ -281,7 +281,7 @@ void BinaryElementWiseImpl(
else
_BinaryElementWise<T, T1, T2, FuncT, false, true, GridDim::maxThreadsPerBlock, GridDim::maxElementsPerThread><<<blocksPerGrid, GridDim::maxThreadsPerBlock, 0>>>(
output_rank_or_simple_broadcast,
*lhs_padded_strides,
TArray<int64_t>(), // lhs is not computed, so no need to deference lhs_padded_strides
lhs_data,
*rhs_padded_strides,
rhs_data,

View file

@ -222,6 +222,9 @@ TEST(CseTests, Subgraph) {
}
}
ASSERT_NE(if_true_graph, nullptr);
ASSERT_NE(if_false_graph, nullptr);
output_names = GetSortedNames(if_true_graph->GetOutputs());
ASSERT_EQ(output_names, (std::vector<std::string>{"Result1", "Result2", "Result3"}));