diff --git a/onnxruntime/test/framework/function_test.cc b/onnxruntime/test/framework/function_test.cc index 41274ee0de..f9a5c76186 100644 --- a/onnxruntime/test/framework/function_test.cc +++ b/onnxruntime/test/framework/function_test.cc @@ -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