diff --git a/onnxruntime/core/providers/cuda/cu_inc/binary_elementwise_impl.cuh b/onnxruntime/core/providers/cuda/cu_inc/binary_elementwise_impl.cuh index 5824c516af..72f0d3652d 100644 --- a/onnxruntime/core/providers/cuda/cu_inc/binary_elementwise_impl.cuh +++ b/onnxruntime/core/providers/cuda/cu_inc/binary_elementwise_impl.cuh @@ -272,7 +272,7 @@ void BinaryElementWiseImpl( output_rank_or_simple_broadcast, *lhs_padded_strides, lhs_data, - *rhs_padded_strides, + TArray(), // 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<<>>( output_rank_or_simple_broadcast, - *lhs_padded_strides, + TArray(), // lhs is not computed, so no need to deference lhs_padded_strides lhs_data, *rhs_padded_strides, rhs_data, diff --git a/onnxruntime/test/optimizer/cse_test.cc b/onnxruntime/test/optimizer/cse_test.cc index 8859959517..3ad91954cc 100644 --- a/onnxruntime/test/optimizer/cse_test.cc +++ b/onnxruntime/test/optimizer/cse_test.cc @@ -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{"Result1", "Result2", "Result3"}));