Skip to content

Commit

Permalink
revert onnxmodelinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mszhanyi committed Oct 9, 2023
1 parent 9b70edd commit 597b4e3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions onnxruntime/test/onnx/TestCase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -769,27 +769,20 @@ void LoadTests(const std::vector<std::basic_string<PATH_CHAR_TYPE>>& input_paths

std::basic_string<PATH_CHAR_TYPE> p = ConcatPathComponent(node_data_root_path, filename_str);

std::unique_ptr<OnnxModelInfo> model_info;
std::unique_ptr<TestModelInfo> model_info;

if (is_onnx_format) {
#if !defined(ORT_MINIMAL_BUILD)
model_info = std::make_unique<OnnxModelInfo>(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<OnnxModelInfo>(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<ITestCase> l = CreateOnnxTestCase(ToUTF8String(test_case_name), std::move(model_info),
Expand Down

0 comments on commit 597b4e3

Please sign in to comment.