Skip to content

Commit

Permalink
Fix unit test when TVM EP is enabled (#18189)
Browse files Browse the repository at this point in the history
### Description

TestInlinedLocalFunctionNotRemoved checks that local functions are not
removed but TVM EP optimizes the whole graph after it is inlined.
  • Loading branch information
xadupre authored Nov 6, 2023
1 parent 398ef67 commit 3b63d85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions onnxruntime/test/framework/function_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,13 @@ TEST(FunctionTest, TestInlinedLocalFunctionNotRemoved) {

// 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());
#endif
}

} // namespace test
Expand Down

0 comments on commit 3b63d85

Please sign in to comment.