From 1c484ce33fe251cd817a1b14e8880f01fbd0cf66 Mon Sep 17 00:00:00 2001 From: ytaous <4484531+ytaous@users.noreply.github.com> Date: Fri, 24 Apr 2020 18:09:46 -0700 Subject: [PATCH] fix test (#3700) Co-authored-by: Ethan Tao --- onnxruntime/test/optimizer/graph_transform_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onnxruntime/test/optimizer/graph_transform_test.cc b/onnxruntime/test/optimizer/graph_transform_test.cc index 63f011e449..7ff3f75e3d 100644 --- a/onnxruntime/test/optimizer/graph_transform_test.cc +++ b/onnxruntime/test/optimizer/graph_transform_test.cc @@ -1748,7 +1748,11 @@ TEST_F(GraphTransformationTests, SkipLayerNormFusion_Input_Output_Check) { // check outputs std::vector& output_defs = node.MutableOutputDefs(); +#ifdef ENABLE_TRAINING + EXPECT_EQ(node.OutputDefs().size(), 3u) << "SkipLayerNormalization number of outputs does not equal to 3. Got:" << node.OutputDefs().size(); +#else EXPECT_EQ(node.OutputDefs().size(), 1u) << "SkipLayerNormalization number of outputs does not equal to 1. Got:" << node.OutputDefs().size(); +#endif EXPECT_EQ(output_defs[0]->Name(), "19"); } else { EXPECT_EQ(node.OpType(), "MatMul") << "Unexpected node: " << node.OpType() << "," << node.Name();