Skip to content

Commit

Permalink
fix right condition
Browse files Browse the repository at this point in the history
  • Loading branch information
xadupre committed Oct 31, 2023
1 parent aa0afee commit ce625c3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions onnxruntime/test/framework/function_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,19 +576,15 @@ TEST(FunctionTest, TestInlinedLocalFunctionNotRemoved) {
ASSERT_STATUS_OK(session_object.Load(sstr));

auto model_proto = session_object.GetModel().ToProto();
#ifdef USE_TVM
// TVM EP takes the whole graph and optimizes it within its own framework.
// It does not retain the original graph.
ASSERT_EQ(0, model_proto.functions_size());
#else
ASSERT_EQ(1, model_proto.functions_size());
#endif

ASSERT_STATUS_OK(session_object.Initialize());

// myfun is not removed because it was claimed by InternalTestingEP
model_proto = session_object.GetModel().ToProto();
#ifdef USE_TVM
// TVM EP takes the whole graph and optimizes it within its own framework.
// It does not retain the original graph.
ASSERT_EQ(0, model_proto.functions_size());
#else
ASSERT_EQ(1, model_proto.functions_size());
Expand Down

0 comments on commit ce625c3

Please sign in to comment.