From 597b4e3cbd55823a2e1c7af24c14ddd6cecd18d5 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Mon, 9 Oct 2023 23:05:06 +0800 Subject: [PATCH] revert onnxmodelinfo --- onnxruntime/test/onnx/TestCase.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/onnxruntime/test/onnx/TestCase.cc b/onnxruntime/test/onnx/TestCase.cc index 8183bfe69cd63..627e975ee3171 100644 --- a/onnxruntime/test/onnx/TestCase.cc +++ b/onnxruntime/test/onnx/TestCase.cc @@ -769,27 +769,20 @@ void LoadTests(const std::vector>& input_paths std::basic_string p = ConcatPathComponent(node_data_root_path, filename_str); - std::unique_ptr model_info; + std::unique_ptr model_info; if (is_onnx_format) { #if !defined(ORT_MINIMAL_BUILD) - model_info = std::make_unique(p.c_str()); + model_info = TestModelInfo::LoadOnnxModel(p.c_str()); #else ORT_THROW("onnx model is not supported in this build"); #endif } else if (is_ort_format) { - model_info = std::make_unique(p.c_str()); + model_info = TestModelInfo::LoadOrtModel(p.c_str()); } else { ORT_NOT_IMPLEMENTED(ToUTF8String(filename_str), " is not supported"); } -#if !defined(ORT_MINIMAL_BUILD) - if (model_info->HasDomain(ONNX_NAMESPACE::AI_ONNX_TRAINING_DOMAIN) || - model_info->HasDomain(ONNX_NAMESPACE::AI_ONNX_PREVIEW_TRAINING_DOMAIN)) { - return true; - } -#endif - const auto tolerance_key = ToUTF8String(my_dir_name); std::unique_ptr l = CreateOnnxTestCase(ToUTF8String(test_case_name), std::move(model_info),