From c38f08b7776effa9b022ffbf5a24f792dd5352b9 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Sat, 31 Jul 2021 17:21:35 +0300 Subject: [PATCH] Use protobuf-lite for ONNX FE by default (#6829) --- .ci/azure/linux.yml | 1 + .ci/azure/mac.yml | 1 + .ci/azure/windows.yml | 1 + CMakeLists.txt | 3 + cmake/developer_package/features.cmake | 8 +- cmake/features.cmake | 6 +- cmake/test_model_zoo.cmake | 128 +++++ .../ie_bridges/python/tests/conftest.py | 5 - .../ie_bridges/python/tests/test_IECore.py | 15 +- .../inference_engine/CMakeLists.txt | 11 +- .../ir_serialization/cleanup.cpp | 6 +- .../ir_serialization/const_compression.cpp | 4 - .../ir_serialization/custom_ops.cpp | 15 +- .../ir_serialization/deterministicity.cpp | 42 +- .../ir_serialization/serialize.cpp | 17 +- .../ir_serialization/tensor_iterator.cpp | 17 +- .../ir_serialization/transformation.cpp | 9 +- .../onnx_reader/model_support_tests.cpp | 15 +- .../models/support_test/supported/basic.onnx | 12 - .../unsupported/no_valid_keys.prototxt | 5 - .../models/ひらがな日本語.prototxt | 97 ---- .../onnx_reader/onnx_reader.cpp | 136 ----- .../onnx_reader/onnx_reader_external_data.cpp | 32 +- .../models/ひらがな日本語.pdmodel | Bin 7839 -> 0 bytes .../paddle_reader/read_paddle_model_test.cpp | 16 +- .../functional/plugin/cpu/CMakeLists.txt | 2 +- .../common_test_utils/file_utils.cpp | 47 ++ .../common_test_utils/file_utils.hpp | 5 + .../common_test_utils/unicode_utils.hpp | 12 +- .../unit/frontends/onnx_import/CMakeLists.txt | 33 +- .../onnx_import/onnx_importer_test.cpp | 48 +- .../frontend/onnx/onnx_common/CMakeLists.txt | 2 +- ngraph/test/CMakeLists.txt | 11 +- .../paddlepaddle/convert_unsupported.cpp | 11 +- ngraph/test/models/onnx/add_abc.onnx | 24 - ngraph/test/models/onnx/filename.prototxt | 95 ---- .../models/onnx/onnx_prototxt_converter.py | 17 +- ngraph/test/onnx/onnx_editor.cpp | 226 ++++---- ngraph/test/onnx/onnx_import.in.cpp | 535 +++++++++--------- .../onnx/onnx_import_const_folding.in.cpp | 12 +- .../test/onnx/onnx_import_controlflow.in.cpp | 52 +- ngraph/test/onnx/onnx_import_convpool.in.cpp | 36 +- .../test/onnx/onnx_import_dyn_shapes.in.cpp | 136 ++--- ngraph/test/onnx/onnx_import_exceptions.cpp | 8 +- .../onnx/onnx_import_external_data.in.cpp | 18 +- .../test/onnx/onnx_import_org_openvino.in.cpp | 38 +- .../test/onnx/onnx_import_provenance.in.cpp | 12 +- ngraph/test/onnx/onnx_import_quant.in.cpp | 54 +- ngraph/test/onnx/onnx_import_reshape.in.cpp | 56 +- ngraph/test/onnx/onnx_import_rnn.in.cpp | 108 ++-- .../test/onnx/onnx_import_with_editor.in.cpp | 8 +- ngraph/test/onnx/onnx_tensor_names.cpp | 4 +- ngraph/test/onnx/onnx_test_utils.in.cpp | 4 +- ngraph/test/requirements_test.txt | 4 +- ngraph/test/requirements_test_onnx.txt | 4 + thirdparty/CMakeLists.txt | 6 +- thirdparty/protobuf/CMakeLists.txt | 8 +- 57 files changed, 1034 insertions(+), 1204 deletions(-) create mode 100644 cmake/test_model_zoo.cmake delete mode 100644 inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/supported/basic.onnx delete mode 100644 inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/unsupported/no_valid_keys.prototxt delete mode 100644 inference-engine/tests/functional/inference_engine/onnx_reader/models/ひらがな日本語.prototxt delete mode 100644 inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader.cpp delete mode 100644 inference-engine/tests/functional/inference_engine/paddle_reader/models/ひらがな日本語.pdmodel create mode 100644 inference-engine/tests/ie_test_utils/common_test_utils/file_utils.cpp delete mode 100644 ngraph/test/models/onnx/add_abc.onnx delete mode 100644 ngraph/test/models/onnx/filename.prototxt create mode 100644 ngraph/test/requirements_test_onnx.txt diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 118ecbb4144..45d14fc252f 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -168,6 +168,7 @@ jobs: - script: | export FE_TEST_MODELS=$(INSTALL_DIR)/tests . $(SETUPVARS) && $(INSTALL_TEST_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml + workingDirectory: $(INSTALL_TEST_DIR) displayName: 'nGraph UT' continueOnError: false diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index 90fc812bbaa..639fd0f68c5 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -103,6 +103,7 @@ jobs: displayName: 'Install' - script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml + workingDirectory: $(BIN_DIR) displayName: 'nGraph UT' continueOnError: false diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 3845fd0112a..6957c1b9455 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -146,6 +146,7 @@ jobs: - script: | set FE_TEST_MODELS=$(INSTALL_DIR)\tests call $(SETUPVARS) && $(INSTALL_TEST_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml + workingDirectory: $(INSTALL_TEST_DIR) displayName: 'nGraph UT' continueOnError: false diff --git a/CMakeLists.txt b/CMakeLists.txt index cfbb8e5ea45..61a96ae9f4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,9 @@ endfunction() ie_cpack_add_component(ngraph REQUIRED) ie_cpack_add_component(ngraph_dev REQUIRED DEPENDS ngraph) +# add target with processed tests model zoo +include(cmake/test_model_zoo.cmake) + add_subdirectory(thirdparty) add_subdirectory(openvino) add_subdirectory(ngraph) diff --git a/cmake/developer_package/features.cmake b/cmake/developer_package/features.cmake index 33e3530bac3..03c94ed41f7 100644 --- a/cmake/developer_package/features.cmake +++ b/cmake/developer_package/features.cmake @@ -44,13 +44,9 @@ ie_option (BUILD_SHARED_LIBS "Build as a shared library" ON) ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF) -if(NOT DEFINED ENABLE_CPPLINT) - ie_dependent_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF) -endif() +ie_dependent_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF) -if(NOT DEFINED ENABLE_CPPLINT_REPORT) - ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) -endif() +ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) ie_dependent_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON "UNIX;NOT ANDROID" OFF) diff --git a/cmake/features.cmake b/cmake/features.cmake index b7e23ee9226..1054ee11f93 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -98,7 +98,7 @@ ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS ie_dependent_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON "NOT MINGW" OFF) -ie_dependent_option (ENABLE_SPEECH_DEMO "enable speech demo integration" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF) +ie_dependent_option (ENABLE_SPEECH_DEMO "enable speech demo integration" ON "NOT APPLE;NOT ANDROID;X86_64" OFF) ie_option (ENABLE_OPENCV "enables OpenCV" ON) @@ -125,8 +125,8 @@ endif() ie_dependent_option(NGRAPH_ONNX_IMPORT_ENABLE "Enable ONNX importer" ON "protoc_available" OFF) ie_dependent_option(NGRAPH_ONNX_FRONTEND_ENABLE "Enable ONNX FrontEnd" OFF "NGRAPH_ONNX_IMPORT_ENABLE" OFF) ie_dependent_option(NGRAPH_PDPD_FRONTEND_ENABLE "Enable PaddlePaddle FrontEnd" ON "protoc_available" OFF) -ie_dependent_option(NGRAPH_USE_PROTOBUF_LITE "Compiles and links with protobuf-lite" OFF - "NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE" OFF) +ie_dependent_option(NGRAPH_USE_PROTOBUF_LITE "Compiles and links with protobuf-lite" ON + "NGRAPH_ONNX_IMPORT_ENABLE" OFF) ie_dependent_option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system protobuf" OFF "NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE" OFF) ie_dependent_option(NGRAPH_UNIT_TEST_ENABLE "Enables ngraph unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF) diff --git a/cmake/test_model_zoo.cmake b/cmake/test_model_zoo.cmake new file mode 100644 index 00000000000..4cba99a246a --- /dev/null +++ b/cmake/test_model_zoo.cmake @@ -0,0 +1,128 @@ +# Copyright (C) 2018-2021 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +function(ov_model_convert SRC DST OUT) + set(onnx_gen_script ${OpenVINO_SOURCE_DIR}/ngraph/test/models/onnx/onnx_prototxt_converter.py) + + file(GLOB_RECURSE prototxt_models RELATIVE "${SRC}" "${SRC}/*.prototxt") + file(GLOB_RECURSE xml_models RELATIVE "${SRC}" "${SRC}/*.xml") + file(GLOB_RECURSE bin_models RELATIVE "${SRC}" "${SRC}/*.bin") + file(GLOB_RECURSE onnx_models RELATIVE "${SRC}" "${SRC}/*.onnx") + file(GLOB_RECURSE data_models RELATIVE "${SRC}" "${SRC}/*.data") + + foreach(in_file IN LISTS prototxt_models xml_models bin_models onnx_models data_models) + get_filename_component(ext "${in_file}" EXT) + get_filename_component(rel_dir "${in_file}" DIRECTORY) + get_filename_component(name_we "${in_file}" NAME_WE) + set(model_source_dir "${SRC}/${rel_dir}") + + if(NOT NGRAPH_ONNX_IMPORT_ENABLE AND ext MATCHES "^\\.(onnx|prototxt)$") + # don't copy / process ONNX / prototxt files + continue() + endif() + + if(ext STREQUAL ".prototxt") + # convert model + set(rel_out_name "${name_we}.onnx") + if(rel_dir) + set(rel_out_name "${rel_dir}/${rel_out_name}") + endif() + else() + # copy as is + set(rel_out_name "${in_file}") + endif() + + set(full_out_name "${DST}/${rel_out_name}") + file(MAKE_DIRECTORY "${DST}/${rel_dir}") + + if(ext STREQUAL ".prototxt") + # convert .prototxt models to .onnx binary + add_custom_command(OUTPUT ${full_out_name} + COMMAND ${PYTHON_EXECUTABLE} ${onnx_gen_script} + "${SRC}/${in_file}" ${full_out_name} + DEPENDS ${onnx_gen_script} "${SRC}/${in_file}" + COMMENT "Generate ${rel_out_name}" + WORKING_DIRECTORY "${model_source_dir}") + else() + add_custom_command(OUTPUT ${full_out_name} + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${SRC}/${in_file}" ${full_out_name} + DEPENDS ${onnx_gen_script} "${SRC}/${in_file}" + COMMENT "Copy ${rel_out_name}" + WORKING_DIRECTORY "${model_source_dir}") + endif() + list(APPEND files "${full_out_name}") + endforeach() + + set(${OUT} ${files} PARENT_SCOPE) +endfunction() + +ov_model_convert("${CMAKE_CURRENT_SOURCE_DIR}/ngraph/test" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/ngraph" + onnx_out_files) + +set(rel_path "inference-engine/tests/functional/inference_engine/onnx_reader") +ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/onnx_reader" + ie_onnx_out_files) + +set(rel_path "inference-engine/tests/functional/inference_engine/ir_serialization") +ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/ir_serialization" + ie_serialize_out_files) + +set(rel_path "inference-engine/tests/unit/frontends/onnx_import/models") +ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/onnx_import" + ie_onnx_import_out_files) + +if(ENABLE_TESTS) + # Note: paddlepaddle==2.1.0 is not found for 32bits architecture + if(NGRAPH_ONNX_IMPORT_ENABLE) + find_package(PythonInterp 3 REQUIRED) + + get_filename_component(PYTHON_EXEC_DIR ${PYTHON_EXECUTABLE} DIRECTORY) + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -m pip --version + WORKING_DIRECTORY ${PYTHON_EXEC_DIR} + RESULT_VARIABLE pip3_exit_code + OUTPUT_VARIABLE pip3_version) + + if(NOT pip3_exit_code EQUAL 0) + message(FATAL_ERROR "Failed to extract pip module version") + endif() + + if(pip3_version MATCHES ".* ([0-9]+)+\.([0-9]+)([\.0-9 ]).*") + set(pip3_version ${CMAKE_MATCH_1}.${CMAKE_MATCH_2}) + else() + message(FATAL_ERROR "Failed to parse ${pip3_version}") + endif() + + message(STATUS "pip version is ${pip3_version}") + set(args --quiet) + if(pip3_version VERSION_GREATER 20.2.2) + list(APPEND args --use-feature=2020-resolver) + endif() + + set(reqs "${OpenVINO_SOURCE_DIR}/ngraph/test/requirements_test_onnx.txt") + add_custom_target(test_pip_prerequsites ALL + "${PYTHON_EXECUTABLE}" -m pip install ${args} -r ${reqs} + COMMENT "Install requirements_test.txt" + VERBATIM + SOURCES ${reqs}) + endif() + + add_custom_target(test_model_zoo DEPENDS ${onnx_out_files} + ${ie_onnx_out_files} + ${ie_serialize_out_files} + ${ie_onnx_import_out_files}) + + if(TARGET test_pip_prerequsites) + add_dependencies(test_model_zoo test_pip_prerequsites) + endif() + + install(DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo" + DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL) + + set(TEST_MODEL_ZOO "./test_model_zoo" CACHE PATH "Path to test model zoo") +endif() diff --git a/inference-engine/ie_bridges/python/tests/conftest.py b/inference-engine/ie_bridges/python/tests/conftest.py index fd327147c33..e697b58ee63 100644 --- a/inference-engine/ie_bridges/python/tests/conftest.py +++ b/inference-engine/ie_bridges/python/tests/conftest.py @@ -21,11 +21,6 @@ def model_onnx_path(): test_onnx = os.path.join(path_to_repo, "models", "test_model", 'test_model.onnx') return test_onnx -def model_prototxt_path(): - path_to_repo = os.environ["MODELS_PATH"] - test_prototxt = os.path.join(path_to_repo, "models", "test_model", 'test_model.prototxt') - return test_prototxt - def image_path(): path_to_repo = os.environ["DATA_PATH"] path_to_img = os.path.join(path_to_repo, 'validation_set', '224x224', 'dog.bmp') diff --git a/inference-engine/ie_bridges/python/tests/test_IECore.py b/inference-engine/ie_bridges/python/tests/test_IECore.py index 7ec955afc53..ed15b12d9b9 100644 --- a/inference-engine/ie_bridges/python/tests/test_IECore.py +++ b/inference-engine/ie_bridges/python/tests/test_IECore.py @@ -10,12 +10,11 @@ from time import sleep, time from queue import Queue from openvino.inference_engine import IENetwork, IECore, ExecutableNetwork -from conftest import model_path, plugins_path, model_onnx_path, model_prototxt_path +from conftest import model_path, plugins_path, model_onnx_path test_net_xml, test_net_bin = model_path() test_net_onnx = model_onnx_path() -test_net_prototxt = model_prototxt_path() plugins_xml, plugins_win_xml, plugins_osx_xml = plugins_path() @@ -204,18 +203,6 @@ def test_read_network_from_onnx_as_path(): assert isinstance(net, IENetwork) -def test_read_network_from_prototxt(): - ie = IECore() - net = ie.read_network(model=test_net_prototxt) - assert isinstance(net, IENetwork) - - -def test_read_network_from_prototxt_as_path(): - ie = IECore() - net = ie.read_network(model=Path(test_net_prototxt)) - assert isinstance(net, IENetwork) - - def test_incorrect_xml(): ie = IECore() with pytest.raises(Exception) as e: diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index 79500fea0ca..a277a0c3eb8 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -25,12 +25,16 @@ set(DEPENDENCIES mock_engine inference_engine_ir_reader inference_engine_ir_v7_reader + HeteroPlugin + AutoPlugin + MultiDevicePlugin template_extension lptNgraphFunctions sharedTestClasses + test_model_zoo ) -if (NOT NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_USE_PROTOBUF_LITE) +if (NOT NGRAPH_ONNX_IMPORT_ENABLE) list(APPEND EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader") endif() @@ -55,7 +59,7 @@ set_ie_threading_interface_for(${TARGET_NAME}) if(NGRAPH_ONNX_IMPORT_ENABLE) target_compile_definitions(${TARGET_NAME} PRIVATE NGRAPH_ONNX_IMPORT_ENABLE - ONNX_TEST_MODELS="${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader/models/") + ONNX_TEST_MODELS="${TEST_MODEL_ZOO}/onnx_reader/models/") add_dependencies(${TARGET_NAME} inference_engine_onnx_reader) endif() @@ -259,4 +263,5 @@ else() endif() # ir serialization functional tests variables -target_compile_definitions(${TARGET_NAME} PRIVATE IR_SERIALIZATION_MODELS_PATH="${CMAKE_CURRENT_SOURCE_DIR}/ir_serialization/models/") +target_compile_definitions(${TARGET_NAME} PRIVATE + IR_SERIALIZATION_MODELS_PATH="${TEST_MODEL_ZOO}/ir_serialization/models/") diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/cleanup.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/cleanup.cpp index 2d84f613341..734c96089cf 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/cleanup.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/cleanup.cpp @@ -9,10 +9,6 @@ #include "ie_core.hpp" #include "ngraph_functions/builders.hpp" -#ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" -#endif - class SerializationCleanupTest : public CommonTestUtils::TestsCommon { protected: const std::string test_name = GetTestName() + "_" + GetTimestamp(); @@ -21,7 +17,7 @@ protected: void TearDown() override { std::remove(m_out_xml_path.c_str()); - std::remove(m_out_xml_path.c_str()); + std::remove(m_out_bin_path.c_str()); } }; diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/const_compression.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/const_compression.cpp index 6871736ed24..4ab43af6536 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/const_compression.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/const_compression.cpp @@ -11,10 +11,6 @@ #include #include -#ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" -#endif - class SerializatioConstantCompressionTest : public ::testing::Test { protected: std::string test_name = diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index 1e9f493b0b1..08de701d499 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -8,13 +8,14 @@ #include #include #include +#include "common_test_utils/file_utils.hpp" #include "common_test_utils/ngraph_test_utils.hpp" #include "ie_core.hpp" #include "ngraph/ngraph.hpp" #include "transformations/serialize.hpp" #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" +# error "IR_SERIALIZATION_MODELS_PATH is not defined" #endif #ifndef IE_BUILD_POSTFIX // should be already defined by cmake @@ -40,7 +41,8 @@ protected: }; TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) { - const std::string model = IR_SERIALIZATION_MODELS_PATH "custom_op.xml"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "custom_op.xml"); InferenceEngine::Core ie; ie.AddExtension( @@ -62,7 +64,8 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) { #ifdef NGRAPH_ONNX_IMPORT_ENABLE TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) { - const std::string model = IR_SERIALIZATION_MODELS_PATH "custom_op.prototxt"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "custom_op.onnx"); InferenceEngine::Core ie; ie.AddExtension( @@ -84,7 +87,8 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) { #endif TEST_F(CustomOpsSerializationTest, CustomOpTransformation) { - const std::string model = IR_SERIALIZATION_MODELS_PATH "custom_op.xml"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "custom_op.xml"); InferenceEngine::Core ie; auto extension = @@ -123,7 +127,8 @@ public: }; TEST_F(CustomOpsSerializationTest, CustomOpNoExtensions) { - const std::string model = IR_SERIALIZATION_MODELS_PATH "custom_op.xml"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "custom_op.xml"); InferenceEngine::Core ie; auto extension = std::make_shared(); diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/deterministicity.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/deterministicity.cpp index cbcd1b3093d..1a010a15c87 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/deterministicity.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/deterministicity.cpp @@ -4,12 +4,13 @@ #include +#include "common_test_utils/file_utils.hpp" #include "common_test_utils/ngraph_test_utils.hpp" #include "gtest/gtest.h" #include "ie_core.hpp" #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" +# error "IR_SERIALIZATION_MODELS_PATH is not defined" #endif class SerializationDeterministicityTest : public ::testing::Test { @@ -49,7 +50,8 @@ protected: #ifdef NGRAPH_ONNX_IMPORT_ENABLE TEST_F(SerializationDeterministicityTest, BasicModel) { - const std::string model = IR_SERIALIZATION_MODELS_PATH "add_abc.prototxt"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc.onnx"); InferenceEngine::Core ie; auto expected = ie.ReadNetwork(model); @@ -66,8 +68,8 @@ TEST_F(SerializationDeterministicityTest, BasicModel) { } TEST_F(SerializationDeterministicityTest, ModelWithMultipleLayers) { - const std::string model = - IR_SERIALIZATION_MODELS_PATH "addmul_abc.prototxt"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "addmul_abc.onnx"); InferenceEngine::Core ie; auto expected = ie.ReadNetwork(model); @@ -86,10 +88,10 @@ TEST_F(SerializationDeterministicityTest, ModelWithMultipleLayers) { #endif TEST_F(SerializationDeterministicityTest, ModelWithMultipleOutputs) { - const std::string model = - IR_SERIALIZATION_MODELS_PATH "split_equal_parts_2d.xml"; - const std::string weights = - IR_SERIALIZATION_MODELS_PATH "split_equal_parts_2d.bin"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "split_equal_parts_2d.xml"); + const std::string weights = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "split_equal_parts_2d.bin"); InferenceEngine::Core ie; auto expected = ie.ReadNetwork(model, weights); @@ -106,10 +108,10 @@ TEST_F(SerializationDeterministicityTest, ModelWithMultipleOutputs) { } TEST_F(SerializationDeterministicityTest, ModelWithConstants) { - const std::string model = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"; - const std::string weights = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"); + const std::string weights = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"); InferenceEngine::Core ie; auto expected = ie.ReadNetwork(model, weights); @@ -126,10 +128,10 @@ TEST_F(SerializationDeterministicityTest, ModelWithConstants) { } TEST_F(SerializationDeterministicityTest, SerializeToStream) { - const std::string model = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"; - const std::string weights = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"); + const std::string weights = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"); std::stringstream m_out_xml_buf, m_out_bin_buf; InferenceEngine::Blob::Ptr binBlob; @@ -154,10 +156,10 @@ TEST_F(SerializationDeterministicityTest, SerializeToStream) { } TEST_F(SerializationDeterministicityTest, SerializeToBlob) { - const std::string model = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"; - const std::string weights = - IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.xml"); + const std::string weights = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc_initializers.bin"); std::stringstream m_out_xml_buf; InferenceEngine::Blob::Ptr m_out_bin_buf; diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp index 112c35086db..49c9baa9f1e 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp @@ -5,11 +5,12 @@ #include #include "common_test_utils/ngraph_test_utils.hpp" +#include "common_test_utils/file_utils.hpp" #include "gtest/gtest.h" #include "ie_core.hpp" #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" +# error "IR_SERIALIZATION_MODELS_PATH is not defined" #endif typedef std::tuple SerializationParams; @@ -23,9 +24,11 @@ public: std::string m_out_bin_path; void SetUp() override { - m_model_path = IR_SERIALIZATION_MODELS_PATH + std::get<0>(GetParam()); + m_model_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH + std::get<0>(GetParam())); if (!std::get<1>(GetParam()).empty()) { - m_binary_path = IR_SERIALIZATION_MODELS_PATH + std::get<1>(GetParam()); + m_binary_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH + std::get<1>(GetParam())); } const std::string test_name = GetTestName() + "_" + GetTimestamp(); @@ -78,9 +81,9 @@ INSTANTIATE_TEST_SUITE_P(IRSerialization, SerializationTest, #ifdef NGRAPH_ONNX_IMPORT_ENABLE INSTANTIATE_TEST_SUITE_P(ONNXSerialization, SerializationTest, - testing::Values(std::make_tuple("add_abc.prototxt", ""), - std::make_tuple("split_equal_parts_2d.prototxt", ""), - std::make_tuple("addmul_abc.prototxt", ""), - std::make_tuple("add_abc_initializers.prototxt", ""))); + testing::Values(std::make_tuple("add_abc.onnx", ""), + std::make_tuple("split_equal_parts_2d.onnx", ""), + std::make_tuple("addmul_abc.onnx", ""), + std::make_tuple("add_abc_initializers.onnx", ""))); #endif diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/tensor_iterator.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/tensor_iterator.cpp index cccad0f70a5..1a751b270ef 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/tensor_iterator.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/tensor_iterator.cpp @@ -4,6 +4,7 @@ #include +#include "common_test_utils/file_utils.hpp" #include "common_test_utils/ngraph_test_utils.hpp" #include "gtest/gtest.h" #include "ie_core.hpp" @@ -12,7 +13,7 @@ #include "pugixml.hpp" #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" +# error "IR_SERIALIZATION_MODELS_PATH is not defined" #endif class SerializationTensorIteratorTest : public ::testing::Test { @@ -24,7 +25,7 @@ protected: void TearDown() override { std::remove(m_out_xml_path.c_str()); - std::remove(m_out_xml_path.c_str()); + std::remove(m_out_bin_path.c_str()); } void serialize_and_compare(const std::string& model_path, InferenceEngine::Blob::Ptr weights) { @@ -47,7 +48,8 @@ protected: }; TEST_F(SerializationTensorIteratorTest, TiResnet) { - const std::string model_path = IR_SERIALIZATION_MODELS_PATH "ti_resnet.xml"; + const std::string model_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "ti_resnet.xml"); size_t weights_size = 8396840; @@ -67,7 +69,8 @@ TEST_F(SerializationTensorIteratorTest, TiResnet) { } TEST_F(SerializationTensorIteratorTest, TiNegativeStride) { - const std::string model_path = IR_SERIALIZATION_MODELS_PATH "ti_negative_stride.xml"; + const std::string model_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "ti_negative_stride.xml"); size_t weights_size = 3149864; @@ -87,8 +90,10 @@ TEST_F(SerializationTensorIteratorTest, TiNegativeStride) { } TEST_F(SerializationTensorIteratorTest, SerializationExternalPortIdInXmlFile) { - const std::string model_path = IR_SERIALIZATION_MODELS_PATH "loop_2d_add.xml"; - const std::string binary_path = IR_SERIALIZATION_MODELS_PATH "loop_2d_add.bin"; + const std::string model_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "loop_2d_add.xml"); + const std::string binary_path = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "loop_2d_add.bin"); InferenceEngine::Core ie; InferenceEngine::CNNNetwork expected; diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/transformation.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/transformation.cpp index 2567e506d20..9142d0ce491 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/transformation.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/transformation.cpp @@ -8,9 +8,10 @@ #include "ie_core.hpp" #include "ngraph/ngraph.hpp" #include "transformations/serialize.hpp" +#include "common_test_utils/file_utils.hpp" #ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake -#define IR_SERIALIZATION_MODELS_PATH "" +# error "IR_SERIALIZATION_MODELS_PATH is not defined" #endif class SerializationTransformationTest : public ::testing::Test { @@ -22,8 +23,10 @@ protected: std::shared_ptr m_function; void SetUp() override { - const std::string model = IR_SERIALIZATION_MODELS_PATH "add_abc.xml"; - const std::string weights = IR_SERIALIZATION_MODELS_PATH "add_abc.bin"; + const std::string model = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc.xml"); + const std::string weights = CommonTestUtils::getModelFromTestModelZoo( + IR_SERIALIZATION_MODELS_PATH "add_abc.bin"); InferenceEngine::Core ie; m_function = ie.ReadNetwork(model, weights).getFunction(); } diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/model_support_tests.cpp b/inference-engine/tests/functional/inference_engine/onnx_reader/model_support_tests.cpp index 579229ad634..0ed41ca973e 100644 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/model_support_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/onnx_reader/model_support_tests.cpp @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "common_test_utils/file_utils.hpp" +#include "ie_common.h" #include #include @@ -12,7 +14,7 @@ namespace { std::string path = ONNX_TEST_MODELS; path += "support_test/"; path += model; - return path; + return CommonTestUtils::getModelFromTestModelZoo(path); } } @@ -37,13 +39,9 @@ TEST(ONNXReader_ModelSupported, varint_on_two_bytes) { EXPECT_NO_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("supported/varint_on_two_bytes.onnx"))); } -TEST(ONNXReader_ModelSupported, prototxt_basic) { - EXPECT_NO_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("supported/basic.prototxt"))); -} - TEST(ONNXReader_ModelSupported, scrambled_keys) { // same as the prototxt_basic but with a different order of keys - EXPECT_NO_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("supported/scrambled_keys.prototxt"))); + EXPECT_NO_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("supported/scrambled_keys.onnx"))); } TEST(ONNXReader_ModelUnsupported, no_graph_field) { @@ -65,8 +63,3 @@ TEST(ONNXReader_ModelUnsupported, unknown_wire_type) { EXPECT_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("unsupported/unknown_wire_type.onnx")), InferenceEngine::Exception); } - -TEST(ONNXReader_ModelUnsupported, no_valid_keys) { - EXPECT_THROW(InferenceEngine::Core{}.ReadNetwork(model_path("unsupported/no_valid_keys.prototxt")), - InferenceEngine::Exception); -} diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/supported/basic.onnx b/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/supported/basic.onnx deleted file mode 100644 index 2469457e577..00000000000 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/supported/basic.onnx +++ /dev/null @@ -1,12 +0,0 @@ -:D - -xy"Cosh -cosh_graphZ -x -  - -b -y -  - -B \ No newline at end of file diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/unsupported/no_valid_keys.prototxt b/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/unsupported/no_valid_keys.prototxt deleted file mode 100644 index 28a5e83672d..00000000000 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/models/support_test/unsupported/no_valid_keys.prototxt +++ /dev/null @@ -1,5 +0,0 @@ -james_bond: 007 -Shakira: "Waka Waka" -blip { - bloop: 21,37 -} diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/models/ひらがな日本語.prototxt b/inference-engine/tests/functional/inference_engine/onnx_reader/models/ひらがな日本語.prototxt deleted file mode 100644 index a6f53724995..00000000000 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/models/ひらがな日本語.prototxt +++ /dev/null @@ -1,97 +0,0 @@ -ir_version: 3 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "A" - input: "B" - output: "X" - name: "multiply_node_1" - op_type: "Mul" - } - node { - input: "X" - input: "C" - output: "Y" - name: "multiply_node_2" - op_type: "Mul" - } - name: "test_graph" - initializer { - dims: 2 - dims: 2 - data_type: 1 - name: "A" - external_data { - key: "location", - value: "data/tensor.data" - } - data_location: 1 - } - input { - name: "A" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } - input { - name: "B" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } - input { - name: "C" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } - output { - name: "Y" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } -} -opset_import { - version: 4 -} diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader.cpp b/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader.cpp deleted file mode 100644 index 4eb19cca1b3..00000000000 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2018-2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include -#include - -#include -#include -#include - -TEST(ONNX_Reader_Tests, ImportBasicModelToCore) { - std::string model = R"V0G0N( -ir_version: 3 -producer_name: "nGraph ONNX Importer" -graph { - node { - output: "B" - op_type: "Constant" - attribute { - name: "value" - t { - dims: 2 - dims: 2 - data_type: 1 - float_data: 1 - float_data: 2 - float_data: 3 - float_data: 4 - name: "const_tensor" - } - type: TENSOR - } - } - node { - input: "A" - input: "B" - output: "X" - name: "add_node1" - op_type: "Add" - } - node { - input: "X" - input: "C" - output: "Y" - name: "add_node2" - op_type: "Add" - } - name: "test_graph" - initializer { - dims: 2 - dims: 2 - data_type: 1 - name: "A" - raw_data: "\000\000\200?\000\000\000@\000\000@@\000\000\200@" - } - input { - name: "A" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } - input { - name: "C" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } - output { - name: "Y" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 2 - } - dim { - dim_value: 2 - } - } - } - } - } -} -opset_import { - version: 4 -} -)V0G0N"; - InferenceEngine::Core ie; - InferenceEngine::Blob::CPtr weights; - auto cnnNetwork = ie.ReadNetwork(model, weights); - auto function = cnnNetwork.getFunction(); - - int count_additions = 0; - int count_constants = 0; - int count_parameters = 0; - - for (auto op : function->get_ops()) { - const auto op_type = std::string(op->get_type_name()); - count_additions += (op_type == "Add" ? 1 : 0); - count_constants += (op_type == "Constant" ? 1 : 0); - count_parameters += (op_type == "Parameter" ? 1 : 0); - } - - ASSERT_EQ(function->get_output_size(), 1); - ASSERT_EQ(std::string(function->get_output_op(0)->get_type_name()), "Result"); - ASSERT_EQ(function->get_output_element_type(0), ngraph::element::f32); - ASSERT_EQ(function->get_output_shape(0), ngraph::Shape({2, 2})); - ASSERT_EQ(count_additions, 2); - ASSERT_EQ(count_constants, 2); - ASSERT_EQ(count_parameters, 1); -} - diff --git a/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader_external_data.cpp b/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader_external_data.cpp index 2ae931d76b8..70b0e7537cc 100644 --- a/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader_external_data.cpp +++ b/inference-engine/tests/functional/inference_engine/onnx_reader/onnx_reader_external_data.cpp @@ -12,11 +12,14 @@ #include #include #include +#include "common_test_utils/file_utils.hpp" +#include "common_test_utils/unicode_utils.hpp" #include TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromFile) { InferenceEngine::Core ie; - auto cnnNetwork = ie.ReadNetwork(std::string(ONNX_TEST_MODELS) + "onnx_external_data.prototxt", ""); + auto cnnNetwork = ie.ReadNetwork(CommonTestUtils::getModelFromTestModelZoo( + std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx"), ""); auto function = cnnNetwork.getFunction(); int count_additions = 0; @@ -48,8 +51,9 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromFile) { TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromStringException) { InferenceEngine::Core ie; - const auto path = std::string(ONNX_TEST_MODELS) + "onnx_external_data.prototxt"; - InferenceEngine::Blob::CPtr weights; //not used + const auto path = CommonTestUtils::getModelFromTestModelZoo( + std::string(ONNX_TEST_MODELS) + "onnx_external_data.onnx"); + InferenceEngine::Blob::CPtr weights; // not used std::ifstream stream(path, std::ios::binary); std::string modelAsString((std::istreambuf_iterator(stream)), std::istreambuf_iterator()); stream.close(); @@ -75,22 +79,28 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromStringException) { #if defined(ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32) TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromWstringNamedFile) { InferenceEngine::Core ie; - std::string win_dir_path = ONNX_TEST_MODELS; - std::replace(win_dir_path.begin(), win_dir_path.end(), '/', '\\'); - const std::wstring unicode_win_dir_path = FileUtils::multiByteCharToWString(win_dir_path.c_str()); - const std::wstring path = unicode_win_dir_path + L"ひらがな日本語.prototxt"; + std::string win_dir_path = CommonTestUtils::getModelFromTestModelZoo( + ONNX_TEST_MODELS "onnx_external_data.onnx"); + std::wstring wmodel = CommonTestUtils::addUnicodePostfixToPath(win_dir_path, + CommonTestUtils::test_unicode_postfix_vector[0]); + bool is_copy_successfully = CommonTestUtils::copyFile(win_dir_path, wmodel); + if (!is_copy_successfully) { + FAIL() << "Unable to copy from '" << win_dir_path << "' to '" + << FileUtils::wStringtoMBCSstringChar(wmodel) << "'"; + } - auto cnnNetwork = ie.ReadNetwork(path, L""); + auto cnnNetwork = ie.ReadNetwork(wmodel, L""); + CommonTestUtils::removeFile(wmodel); auto function = cnnNetwork.getFunction(); - int count_multiply = 0; + int count_add = 0; int count_constants = 0; int count_parameters = 0; std::shared_ptr external_data_node; for (auto op : function->get_ops()) { const auto op_type = std::string(op->get_type_name()); - count_multiply += (op_type == "Multiply" ? 1 : 0); + count_add += (op_type == "Add" ? 1 : 0); count_parameters += (op_type == "Parameter" ? 1 : 0); if (op_type == "Constant") { count_constants += 1; @@ -102,7 +112,7 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromWstringNamedFile) { ASSERT_EQ(std::string(function->get_output_op(0)->get_type_name()), "Result"); ASSERT_EQ(function->get_output_element_type(0), ngraph::element::f32); ASSERT_EQ(function->get_output_shape(0), ngraph::Shape({2, 2})); - ASSERT_EQ(count_multiply, 2); + ASSERT_EQ(count_add, 2); ASSERT_EQ(count_constants, 1); ASSERT_EQ(count_parameters, 2); diff --git a/inference-engine/tests/functional/inference_engine/paddle_reader/models/ひらがな日本語.pdmodel b/inference-engine/tests/functional/inference_engine/paddle_reader/models/ひらがな日本語.pdmodel deleted file mode 100644 index 9bb64f2a50d5dce914bbee2b1592af7a08a7c3a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7839 zcmeHMOK%%D5VjIIk?BVirA`eM2o~E0mKG=$y)^sb>LNuvyJdMZxvW@)K#v0Om;!hG?3ac*s{ zyos)*q(?F1Eh=#=LK^vLlSFh#Q9nVkigNuI2c4Yz(+XNZxd$c7ynxQ%&r~VbFPpx5 z2`z{OhqT9f2E9|4pHWz& zsuM?e%fi*)zS3G8{Fu|AlQ0RrR+O>OW5OG&I^|7j)xBa?(zt7mzBpYvNOcQtRK!wM zb7-H|96L#?7bh{@(?2&{FA2>!oK8X{iBo)X0<&M-YH)WXh`S+e3Q$8KZ-PSJyuEvG zq=#EZgUL@e&_z~OplY#08-tcbwDO2=j0yl}YkFJDo zB;g;xg-K`#_i>10LXKOv3-K~NhT-2>gK2JBR@ zwLp&aK*;VSriK;F5h#sm1Zp}MaVlUyWyVIL-q@+X{Cu`Gq(oA%N+H&Ighi58^j*e@ z6kwuat6uN{3?9}B1TyQM0nGYsdlg;;6Rc{8L@Al>9j-S;w0_57Ppd(EDj24o+wSP# zMp#4=d^AR3HOB+9QE?3}xCdVgPOH`6hcg3J-)-1q1a0C>fr{VIh+0BAW)IpCC`p=h zAMTDv`?{^L@ky2H9rucHQ|9=Z;DW%J<$QM;T^xEd?Nr?bbRNWOntv^z3)(G$&%9!N z;xT_*&Kv9g0{v7Te-vg8@||*!b&JM0$f{N$@P*Ev^*Ee++Ab+3IEg$xrNY50;eIvX zZ>ZUv`{Sj3&`s7On$Lu#x>awCefJj{T8Bmnm7X^HV4g%$QGL~$?%I|D-zy&-bzd?GS{NOK5iY+bi42z%DRQtBGZB6YM^?%&Doe0Z|2xTcmO5G^rym;Xo9l0;)k!ChA za6GpEy@;04;S^aNOW17z+;B5blqCRS7aaMd6SH|E66sAx$ARt&prWzo8M<7 zHQl*6_bMvtE+#Dnx@AZJYwkt6Jk_o~zcjO}@04AgB_6ZHW0rVKxbu3WVUx0{iQ$g+ zlaNx>oVr(YOm^yyCmt*596ohDh;w72Dhy)m&guE{)Q5;??9A)+?fRz8m9!TKKGhg) z$YG50IOedS$MlG!HcVDbYA_2wPNv2G|M25P-SD>+^q~$WUJ*BxmTY)oE2Cxm?=`BB zKhLU=jae}8TD4?jV@>&Q!tl+ikh3b}L`n2)s*wLuC2nX(JIqE+343Z45=z@=UWD8| zmd_tyd07#1mZYCq2{K=J_Wa4lpLz5?x(v}DP6qo7ia`3k3}bjE%p>r!TqsN*XC#7w z99l&4-FVo&IZ zMhb>W#M%}iR5J{Y@#a?1rAUZwmS9Ep^<(6gp #include #include "common_test_utils/ngraph_test_utils.hpp" +#include "common_test_utils/unicode_utils.hpp" TEST(PDPD_Reader_Tests, ImportBasicModelToCore) { auto model = std::string(PADDLE_TEST_MODELS) + "relu.pdmodel"; @@ -48,12 +49,17 @@ TEST(PDPD_Reader_Tests, ImportBasicModelToCore) { #if defined(ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32) TEST(PDPD_Reader_Tests, ImportBasicModelToCoreWstring) { - std::string win_dir_path{ PADDLE_TEST_MODELS }; - std::replace(win_dir_path.begin(), win_dir_path.end(), '/', '\\'); - const std::wstring unicode_win_dir_path = FileUtils::multiByteCharToWString(win_dir_path.c_str()); - auto model = unicode_win_dir_path + L"ひらがな日本語.pdmodel"; + std::string win_dir_path{ PADDLE_TEST_MODELS "relu.pdmodel" }; + std::wstring wmodel = CommonTestUtils::addUnicodePostfixToPath(win_dir_path, + CommonTestUtils::test_unicode_postfix_vector[0]); + bool is_copy_successfully = CommonTestUtils::copyFile(win_dir_path, wmodel); + if (!is_copy_successfully) { + FAIL() << "Unable to copy from '" << win_dir_path << "' to '" + << FileUtils::wStringtoMBCSstringChar(wmodel) << "'"; + } InferenceEngine::Core ie; - auto cnnNetwork = ie.ReadNetwork(model); + auto cnnNetwork = ie.ReadNetwork(wmodel); + CommonTestUtils::removeFile(wmodel); auto function = cnnNetwork.getFunction(); const auto inputType = ngraph::element::f32; diff --git a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt index 4248f702de0..c857007f60c 100644 --- a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(cpuSpecificRtInfo PRIVATE ngraph) set(INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${IE_MAIN_SOURCE_DIR}/src/mkldnn_plugin) set(DEPENDENCIES MKLDNNPlugin AutoPlugin) set(LINK_LIBRARIES funcSharedTests cpuSpecificRtInfo) -if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) +if (NGRAPH_ONNX_IMPORT_ENABLE) list(APPEND INCLUDES "${OpenVINO_SOURCE_DIR}/docs/onnx_custom_op") list(APPEND LINK_LIBRARIES onnx_custom_op) list(APPEND DEPENDENCIES template_extension onnx_custom_op) diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.cpp new file mode 100644 index 00000000000..599d688a65a --- /dev/null +++ b/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.cpp @@ -0,0 +1,47 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include + +#ifdef __APPLE__ +# include +#endif + +#ifdef _WIN32 +# include +#else +# include +# include +# include +#endif + +namespace CommonTestUtils { + +std::string getExecutableDirectory() { + std::string path; +#ifdef _WIN32 + char buffer[MAX_PATH]; + int len = GetModuleFileNameA(NULL, buffer, MAX_PATH); +#elif defined(__APPLE__) + Dl_info info; + dladdr(reinterpret_cast(getExecutableDirectory), &info); + const char * buffer = info.dli_fname; + int len = std::strlen(buffer); +#else + char buffer[PATH_MAX]; + int len = readlink("/proc/self/exe", buffer, PATH_MAX); +#endif + if (len < 0) { + throw "Can't get test executable path name"; + } + path = std::string(buffer, len); + return ngraph::file_util::get_directory(path); +} + +std::string getModelFromTestModelZoo(const std::string & relModelPath) { + return ngraph::file_util::path_join(CommonTestUtils::getExecutableDirectory(), relModelPath); +} + +} // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.hpp index 34aa4c75c44..163d58d6aff 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/file_utils.hpp @@ -239,4 +239,9 @@ inline std::vector splitStringByDelimiter(std::string paths, const splitPath.push_back(paths); return splitPath; } + +std::string getExecutableDirectory(); + +std::string getModelFromTestModelZoo(const std::string & relModelPath); + } // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/unicode_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/unicode_utils.hpp index f88b8dbe24c..ce0e31af860 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/unicode_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/unicode_utils.hpp @@ -14,6 +14,7 @@ #include "w_dirent.h" #ifdef ENABLE_UNICODE_PATH_SUPPORT + namespace CommonTestUtils { inline void fixSlashes(std::string &str) { @@ -55,11 +56,12 @@ inline bool copyFile(std::string source_path, std::wstring dest_path) { inline std::wstring addUnicodePostfixToPath(std::string source_path, std::wstring postfix) { fixSlashes(source_path); - std::wstring result = stringToWString(source_path); - std::wstring file_name = result.substr(0, result.size() - 4); - std::wstring extension = result.substr(result.size() - 4, result.size()); - result = file_name + postfix + extension; - return result; + auto result = stringToWString(source_path); + auto extPos = result.rfind('.'); + auto extension = result.substr(extPos, result.size()); + auto file_name = result.substr(0, extPos); + + return file_name + postfix + extension; } inline void removeFile(std::wstring path) { diff --git a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt index 2f3efc8aae5..6b44002c684 100644 --- a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt +++ b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt @@ -2,20 +2,21 @@ # SPDX-License-Identifier: Apache-2.0 # -if (NOT NGRAPH_USE_PROTOBUF_LITE) - set(TARGET_NAME onnxImporterUnitTests) +set(TARGET_NAME onnxImporterUnitTests) - addIeTargetTest( - NAME ${TARGET_NAME} - ROOT ${CMAKE_CURRENT_SOURCE_DIR} - LINK_LIBRARIES - gtest - gtest_main - onnx_importer - DEFINES - ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\" - ADD_CPPLINT - LABELS - ONNX - ) -endif() +addIeTargetTest( + NAME ${TARGET_NAME} + ROOT ${CMAKE_CURRENT_SOURCE_DIR} + LINK_LIBRARIES + gtest + gtest_main + commonTestUtils + onnx_importer + DEFINES + ONNX_MODELS_DIR=\"${TEST_MODEL_ZOO}/onnx_import\" + ADD_CPPLINT + DEPENDENCIES + test_model_zoo + LABELS + ONNX +) diff --git a/inference-engine/tests/unit/frontends/onnx_import/onnx_importer_test.cpp b/inference-engine/tests/unit/frontends/onnx_import/onnx_importer_test.cpp index f2b08deae6f..6c7fa1aeda5 100644 --- a/inference-engine/tests/unit/frontends/onnx_import/onnx_importer_test.cpp +++ b/inference-engine/tests/unit/frontends/onnx_import/onnx_importer_test.cpp @@ -7,11 +7,13 @@ #include #include +#include "common_test_utils/file_utils.hpp" #include "ngraph/file_util.hpp" #include "onnx_import/onnx.hpp" TEST(ONNX_Importer_Tests, ImportBasicModel) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "add_abc_initializers.prototxt"); + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "add_abc_initializers.onnx")); auto function = ngraph::onnx_import::import_onnx_model(model_file_path); int count_additions = 0; @@ -35,7 +37,8 @@ TEST(ONNX_Importer_Tests, ImportBasicModel) { } TEST(ONNX_Importer_Tests, ImportModelWithFusedOp) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "selu.prototxt"); + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "selu.onnx")); auto function = ngraph::onnx_import::import_onnx_model(model_file_path); int count_selu = 0; @@ -59,7 +62,8 @@ TEST(ONNX_Importer_Tests, ImportModelWithFusedOp) { } TEST(ONNX_Importer_Tests, ImportModelWithMultiOutput) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "topk.prototxt"); + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "topk.onnx")); auto function = ngraph::onnx_import::import_onnx_model(model_file_path); int count_topk = 0; @@ -86,7 +90,8 @@ TEST(ONNX_Importer_Tests, ImportModelWithMultiOutput) { } TEST(ONNX_Importer_Tests, ImportModelWithNotSupportedOp) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "not_supported.prototxt"); + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "not_supported.onnx")); try { auto function = ngraph::onnx_import::import_onnx_model(model_file_path); FAIL() << "Any expection was thrown despite the ONNX model is not supported"; @@ -100,7 +105,8 @@ TEST(ONNX_Importer_Tests, ImportModelWithNotSupportedOp) { } TEST(ONNX_Importer_Tests, ImportModelWhenFileDoesNotExist) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "not_exist_file.prototxt"); + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "not_exist_file.onnx")); try { auto function = ngraph::onnx_import::import_onnx_model(model_file_path); FAIL() << "Any expection was thrown despite the ONNX model file does not exist"; @@ -113,26 +119,26 @@ TEST(ONNX_Importer_Tests, ImportModelWhenFileDoesNotExist) { } } -TEST(ONNX_Importer_Tests, ImportModelFromStream) { - auto model_file_path = ngraph::file_util::path_join(ONNX_MODELS_DIR, "addmul_abc.prototxt"); +// TODO: CVS-61224 +TEST(ONNX_Importer_Tests, DISABLED_ImportModelFromStream) { + auto model_file_path = CommonTestUtils::getModelFromTestModelZoo( + ngraph::file_util::path_join(ONNX_MODELS_DIR, "addmul_abc.onnx")); std::ifstream model_file_stream(model_file_path); - if (model_file_stream.is_open()) { - int count_adds = 0; - int count_multiplies = 0; - int count_parameters = 0; + ASSERT_TRUE(model_file_stream.is_open()); + int count_adds = 0; + int count_multiplies = 0; + int count_parameters = 0; - auto function = ngraph::onnx_import::import_onnx_model(model_file_stream); - for (auto op : function->get_ops()) { + auto function = ngraph::onnx_import::import_onnx_model(model_file_stream); + for (auto op : function->get_ops()) { const auto op_type = std::string(op->get_type_name()); - count_adds += (op_type == "Add" ? 1 : 0); - count_multiplies += (op_type == "Multiply" ? 1 : 0); - count_parameters += (op_type == "Parameter" ? 1 : 0); - } - ASSERT_EQ(count_adds, 1); - ASSERT_EQ(count_multiplies, 1); - ASSERT_EQ(count_parameters, 3); + count_adds += (op_type == "Add" ? 1 : 0); + count_multiplies += (op_type == "Multiply" ? 1 : 0); + count_parameters += (op_type == "Parameter" ? 1 : 0); } - model_file_stream.close(); + ASSERT_EQ(count_adds, 1); + ASSERT_EQ(count_multiplies, 1); + ASSERT_EQ(count_parameters, 3); } TEST(ONNX_Importer_Tests, GetSupportedOperators) { diff --git a/ngraph/frontend/onnx/onnx_common/CMakeLists.txt b/ngraph/frontend/onnx/onnx_common/CMakeLists.txt index ef1a5341400..3eaf88f0c13 100644 --- a/ngraph/frontend/onnx/onnx_common/CMakeLists.txt +++ b/ngraph/frontend/onnx/onnx_common/CMakeLists.txt @@ -29,7 +29,7 @@ target_include_directories(${TARGET_NAME} PUBLIC $) target_link_libraries(${TARGET_NAME} PRIVATE ngraph) -link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LIBRARIES}) +link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LITE_LIBRARIES}) target_include_directories(${TARGET_NAME} PRIVATE ${ONNX_COMMON_SRC_DIR}) diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 304522e46f7..a526f19e54f 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -add_definitions("-DSERIALIZED_ZOO=\"${CMAKE_CURRENT_SOURCE_DIR}/models\"") +add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/ngraph/models\") set(NGRAPH_ONNX_NAMESPACE ngraph_onnx) add_subdirectory(runtime) @@ -374,7 +374,7 @@ if (NGRAPH_UNIT_TEST_BACKENDS_ENABLE) set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} INTERPRETER) endif() -add_definitions("-DTEST_FILES=\"${CMAKE_CURRENT_SOURCE_DIR}/files\"") +add_definitions("-DTEST_FILES=\"${TEST_MODEL_ZOO}/ngraph/files\"") add_subdirectory(util) # backend specific test files must meet the following requirements: @@ -530,7 +530,7 @@ set(MULTI_TEST_SRC backend/zero_sized.in.cpp ) -if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) +if (NGRAPH_ONNX_IMPORT_ENABLE) list(APPEND MULTI_TEST_SRC onnx/onnx_import.in.cpp onnx/onnx_import_controlflow.in.cpp @@ -621,7 +621,7 @@ target_link_libraries(unit-test PRIVATE ngraph_test_util # Protobuf-lite does not support parsing files from prototxt format # Since most of the onnx models are stored in this format it have to be disabled -if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) +if (NGRAPH_ONNX_IMPORT_ENABLE) # It's needed by onnx_import_library.cpp and onnx_import_exceptions.cpp tests to include onnx_pb.h. # Not linking statically to libprotobuf (linked into libonnx) avoids false-failing onnx_editor tests. target_include_directories(unit-test @@ -682,3 +682,6 @@ if (NGRAPH_PDPD_FRONTEND_ENABLE AND paddlepaddle_FOUND) COMPONENT tests EXCLUDE_FROM_ALL) endif() + +# process models +add_dependencies(unit-test test_model_zoo) diff --git a/ngraph/test/frontend/paddlepaddle/convert_unsupported.cpp b/ngraph/test/frontend/paddlepaddle/convert_unsupported.cpp index ac8c0dc1b25..735a6e671f5 100644 --- a/ngraph/test/frontend/paddlepaddle/convert_unsupported.cpp +++ b/ngraph/test/frontend/paddlepaddle/convert_unsupported.cpp @@ -6,8 +6,8 @@ #include #include "common_test_utils/ngraph_test_utils.hpp" -#include "utils.hpp" #include "paddle_utils.hpp" +#include "utils.hpp" using namespace ngraph; using namespace ngraph::frontend; @@ -32,9 +32,12 @@ TEST(FrontEndConvertModelTest, test_unsupported_op) ASSERT_NO_THROW(function = frontEnd->convert_partially(inputModel)); ASSERT_THROW(frontEnd->convert(function), OpConversionFailure); - for (auto& node : function->get_ordered_ops()) { - if (node->get_friendly_name() == "rxyz_0.tmp_0") { - function->replace_node(node, std::make_shared(node->input(0).get_source_output())); + for (auto& node : function->get_ordered_ops()) + { + if (node->get_friendly_name() == "rxyz_0.tmp_0") + { + function->replace_node( + node, std::make_shared(node->input(0).get_source_output())); } } ASSERT_NO_THROW(frontEnd->convert(function)); diff --git a/ngraph/test/models/onnx/add_abc.onnx b/ngraph/test/models/onnx/add_abc.onnx deleted file mode 100644 index 5c2da5dcc0b..00000000000 --- a/ngraph/test/models/onnx/add_abc.onnx +++ /dev/null @@ -1,24 +0,0 @@ -ngraph ONNXImporter: - -A -BX add_node1"Add - -X -CY add_node2"Add -test_graphZ -A - - -Z -B - - -Z -C - - -b -Y - - -B \ No newline at end of file diff --git a/ngraph/test/models/onnx/filename.prototxt b/ngraph/test/models/onnx/filename.prototxt deleted file mode 100644 index e3b955c4424..00000000000 --- a/ngraph/test/models/onnx/filename.prototxt +++ /dev/null @@ -1,95 +0,0 @@ -ir_version: 3 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "cond" - output: "cond_bool" - op_type: "Cast" - attribute { - name: "to" - i: 9 - type: INT - } - } - node { - input: "cond_bool" - input: "x1" - input: "x2" - output: "y" - op_type: "Where" - } - name: "where_graph" - input { - name: "cond" - type { - tensor_type { - elem_type: INT32 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } - input { - name: "x1" - type { - tensor_type { - elem_type: INT32 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 3 - } - } - } - } - } - input { - name: "x2" - type { - tensor_type { - elem_type: INT32 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 1 - } - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: INT32 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } -} -opset_import { - version: 9 -} diff --git a/ngraph/test/models/onnx/onnx_prototxt_converter.py b/ngraph/test/models/onnx/onnx_prototxt_converter.py index d8e06d58698..3be04b037b1 100644 --- a/ngraph/test/models/onnx/onnx_prototxt_converter.py +++ b/ngraph/test/models/onnx/onnx_prototxt_converter.py @@ -24,6 +24,7 @@ Options: from docopt import docopt from google.protobuf import text_format import onnx +from onnx.external_data_helper import convert_model_to_external_data import os ONNX_SUFFX = '.onnx' @@ -53,6 +54,18 @@ _ext_map = { def _get_output_file_path(path, extension): return path + _ext_map[extension] + +def save_model(proto, f, format=None, save_as_external_data=False, all_tensors_to_one_file=True, location=None, size_threshold=1024, convert_attribute=False): + if isinstance(proto, bytes): + proto = onnx._deserialize(proto, onnx.ModelProto()) + + if save_as_external_data: + convert_model_to_external_data(proto, all_tensors_to_one_file, location, size_threshold, convert_attribute) + + s = onnx._serialize(proto) + onnx._save_bytes(s, f) + + if __name__ == '__main__': args = docopt(__doc__) input_file_path = args['INPUT_FILE'] @@ -61,8 +74,6 @@ if __name__ == '__main__': else: output_file_path = args['OUTPUT_FILE'] - print('Converting {} to {}.'.format(input_file_path, output_file_path)) - if not os.path.exists(input_file_path): sys.exit('ERROR: Provided input model path does not exists: {}'.format(input_file_path)) @@ -75,6 +86,6 @@ if __name__ == '__main__': elif _is_txt_file(input_file_path) and _is_bin_file(output_file_path): with open(input_file_path, 'r') as f: converted_model = _txt2bin(f.read()) - onnx.save(converted_model, output_file_path) + save_model(converted_model, output_file_path) else: sys.exit('ERROR: Provided input or output file has unsupported format.') diff --git a/ngraph/test/onnx/onnx_editor.cpp b/ngraph/test/onnx/onnx_editor.cpp index 707a121bea1..b6b905ba91b 100644 --- a/ngraph/test/onnx/onnx_editor.cpp +++ b/ngraph/test/onnx/onnx_editor.cpp @@ -54,7 +54,7 @@ NGRAPH_TEST(onnx_editor, types__single_input_type_substitution) { // the original model contains 2 inputs with i64 data type and one f32 input ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")}; editor.set_input_types({{"A", element::i64}}); @@ -77,7 +77,7 @@ NGRAPH_TEST(onnx_editor, types__all_inputs_type_substitution) { // the original model contains 2 inputs with i64 data type and one f32 input ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")}; editor.set_input_types({{"A", element::i8}, {"B", element::i8}, {"C", element::i8}}); @@ -98,7 +98,7 @@ NGRAPH_TEST(onnx_editor, types__all_inputs_type_substitution) NGRAPH_TEST(onnx_editor, types__missing_type_in_input_descriptor) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_type.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_type.onnx")}; // input A doesn't have the "type" field in the model and so the data type cannot be modified EXPECT_THROW(editor.set_input_types({{"A", element::f32}}), ngraph_error); @@ -107,7 +107,7 @@ NGRAPH_TEST(onnx_editor, types__missing_type_in_input_descriptor) NGRAPH_TEST(onnx_editor, types__missing_tensor_type_in_input_descriptor) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_tensor_type.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_tensor_type.onnx")}; // input A doesn't have the "tensor_type" field in the model EXPECT_THROW(editor.set_input_types({{"A", element::f32}}), ngraph_error); @@ -116,7 +116,7 @@ NGRAPH_TEST(onnx_editor, types__missing_tensor_type_in_input_descriptor) NGRAPH_TEST(onnx_editor, types__unsupported_data_type_passed) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")}; EXPECT_THROW(editor.set_input_types({{"A", element::dynamic}}), ngraph_error); } @@ -124,7 +124,7 @@ NGRAPH_TEST(onnx_editor, types__unsupported_data_type_passed) NGRAPH_TEST(onnx_editor, types__incorrect_input_name_passed) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")}; EXPECT_THROW(editor.set_input_types({{"ShiaLaBeouf", element::i64}}), ngraph_error); } @@ -133,7 +133,7 @@ NGRAPH_TEST(onnx_editor, types__elem_type_missing_in_input) { // the original model contains 2 inputs with i64 data type and one f32 input ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/elem_type_missing_in_input.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/elem_type_missing_in_input.onnx")}; // the "elem_type" is missing in the model but it should be possible to set the type anyway EXPECT_NO_THROW(editor.set_input_types({{"A", element::i64}})); @@ -154,7 +154,7 @@ NGRAPH_TEST(onnx_editor, types__elem_type_missing_in_input) NGRAPH_TEST(onnx_editor, shapes__modify_single_input) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape = PartialShape{1}; @@ -169,7 +169,7 @@ NGRAPH_TEST(onnx_editor, shapes__modify_single_input) NGRAPH_TEST(onnx_editor, shapes__modify_all_inputs) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape = PartialShape{1, 2, 3, 5, 8, 13}; @@ -187,7 +187,7 @@ NGRAPH_TEST(onnx_editor, shapes__modify_all_inputs) NGRAPH_TEST(onnx_editor, shapes__dynamic_rank_in_model) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/shapes__dynamic_rank_in_model.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/shapes__dynamic_rank_in_model.onnx")}; // input A in the model doesn't have the "shape" field meaning it has dynamic rank // it should still be possible to set such input's shape to some custom value @@ -204,7 +204,7 @@ NGRAPH_TEST(onnx_editor, shapes__dynamic_rank_in_model) NGRAPH_TEST(onnx_editor, shapes__set_dynamic_dimension) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape = PartialShape{Dimension::dynamic()}; @@ -219,7 +219,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_dynamic_dimension) NGRAPH_TEST(onnx_editor, shapes__set_mixed_dimensions) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape_A = PartialShape{21, Dimension::dynamic()}; const auto new_shape_B = PartialShape{Dimension::dynamic(), 37}; @@ -239,7 +239,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_mixed_dimensions) NGRAPH_TEST(onnx_editor, shapes__set_scalar_inputs) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape = PartialShape{}; @@ -258,7 +258,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_scalar_inputs) NGRAPH_TEST(onnx_editor, shapes__static_to_dynamic_rank_substitution) { ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")}; const auto new_shape = PartialShape::dynamic(); @@ -277,12 +277,12 @@ NGRAPH_TEST(onnx_editor, shapes__static_to_dynamic_rank_substitution) NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({{InputEdge(1, 0)}}, {}); const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -292,14 +292,14 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut) NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut_ins_and_outs) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({{InputEdge(1, 0)}}, {{OutputEdge(2, 0)}}); // expected to behave the same way as subgraph__linear_model_head_cut const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -309,13 +309,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut_ins_and_outs) NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_head_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({{InputEdge(2, 0)}}, {}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, - "onnx/model_editor/reference/subgraph__linear_model_deeper_head_cut.prototxt"); + "onnx/model_editor/reference/subgraph__linear_model_deeper_head_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -325,12 +325,12 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_head_cut) NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}}); const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -340,13 +340,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut) NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut_ins_and_outs) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({{InputEdge{0, 0}}}, {{OutputEdge{1, 0}}}); // expected to behave the same way as subgraph__linear_model_tail_cut const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -356,13 +356,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut_ins_and_outs) NGRAPH_TEST(onnx_editor, subgraph__linear_model_with_initializer_tail_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.onnx")}; editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, - "onnx/model_editor/reference/subgraph__linear_model_with_initializer_tail_cut.prototxt"); + "onnx/model_editor/reference/subgraph__linear_model_with_initializer_tail_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -372,14 +372,14 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_with_initializer_tail_cut) NGRAPH_TEST(onnx_editor, subgraph__initializer_without_matching_input_tail_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.onnx")}; editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}}); const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__initializer_without_matching_input_tail_cut.prototxt"); + "subgraph__initializer_without_matching_input_tail_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -389,13 +389,13 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_without_matching_input_tail_cut) NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_tail_cut) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; editor.cut_graph_fragment({}, {{OutputEdge{0, 0}}}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, - "onnx/model_editor/reference/subgraph__linear_model_deeper_tail_cut.prototxt"); + "onnx/model_editor/reference/subgraph__linear_model_deeper_tail_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -405,7 +405,7 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_tail_cut) NGRAPH_TEST(onnx_editor, subgraph__no_input_params) { const auto model_path = - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt"); + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx"); ONNXModelEditor editor{model_path}; @@ -419,14 +419,14 @@ NGRAPH_TEST(onnx_editor, subgraph__no_input_params) NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.onnx")}; editor.cut_graph_fragment({{InputEdge{0, 2}}}, {{OutputEdge{0, 0}}}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, - "onnx/model_editor/reference/subgraph__initializer_to_input_replacement.prototxt"); + "onnx/model_editor/reference/subgraph__initializer_to_input_replacement.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -436,14 +436,14 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement) NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement_2) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.onnx")}; editor.cut_graph_fragment({{InputEdge{0, 2}}}, {{OutputEdge{0, 0}}}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, - "onnx/model_editor/reference/subgraph__initializer_to_input_replacement.prototxt"); + "onnx/model_editor/reference/subgraph__initializer_to_input_replacement.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -453,12 +453,12 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement_2) NGRAPH_TEST(onnx_editor, subgraph__multiout_op_output_edge) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({}, {{OutputEdge{5, 1}}}); const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__multiout_op_output_edge.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__multiout_op_output_edge.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -468,7 +468,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiout_op_output_edge) NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{1, 1}, InputEdge{2, 0}}}, {{OutputEdge{4, 0}}}); @@ -476,7 +476,7 @@ NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction) const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__existing_inputs_and_outputs_based_extraction.prototxt"); + "subgraph__existing_inputs_and_outputs_based_extraction.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -486,14 +486,14 @@ NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction) NGRAPH_TEST(onnx_editor, subgraph__twice_input_edge_from_tensor_with_single_consumer) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")}; editor.cut_graph_fragment({InputEdge{1, 1}}, {}); const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__twice_input_edge_from_tensor_with_single_consumer.prototxt"); + "subgraph__twice_input_edge_from_tensor_with_single_consumer.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -503,7 +503,7 @@ NGRAPH_TEST(onnx_editor, subgraph__twice_input_edge_from_tensor_with_single_cons NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{1, 0}, InputEdge{6, 0}}}, {{OutputEdge{6, 0}, OutputEdge{4, 0}}}); @@ -511,7 +511,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -521,7 +521,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_2) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{3, 0}, InputEdge{3, 1}}}, {{OutputEdge{3, 0}, OutputEdge{4, 0}}}); @@ -529,7 +529,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers_2.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers_2.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -539,7 +539,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_3) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{3, 0}, InputEdge{6, 0}}}, {{OutputEdge{6, 0}, OutputEdge{5, 1}}}); @@ -547,7 +547,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers_3.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers_3.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -557,14 +557,14 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_4) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{1, 0}, InputEdge{3, 0}}}, {}); const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers_4.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers_4.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -574,7 +574,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_5) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({InputEdge{3, 0}}, {{OutputEdge{6,0}, OutputEdge{5, 1}}}); @@ -583,7 +583,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers_5.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers_5.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -593,7 +593,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; editor.cut_graph_fragment({{InputEdge{1, 0, "new_name_1"}, InputEdge{6, 0, "new_name_2"}}}, {{OutputEdge{6, 0}, OutputEdge{4, 0}}}); @@ -601,7 +601,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names.prototxt"); + "subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -611,14 +611,14 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_input_relu2) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; editor.cut_graph_fragment({{InputEdge{4, 0}}}, {}); const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__multiple_consumers_of_graph_input_relu2.prototxt"); + "subgraph__multiple_consumers_of_graph_input_relu2.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -628,14 +628,14 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_input_relu2) NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; editor.cut_graph_fragment({{InputEdge{2, 0}}}, {}); const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__multiple_consumers_of_graph_initializer.prototxt"); + "subgraph__multiple_consumers_of_graph_initializer.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -645,7 +645,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer) NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; editor.cut_graph_fragment({{InputEdge{2, 0}, InputEdge{3, 0}}}, {}); @@ -653,7 +653,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2) const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__multiple_consumers_of_graph_initializer.prototxt"); + "subgraph__multiple_consumers_of_graph_initializer.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -663,14 +663,14 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2) NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_relu2_and_init) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; editor.cut_graph_fragment({{InputEdge{5, 0}, InputEdge{3, 0}}}, {}); const auto ref_model = file_util::path_join( SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__multiple_consumers_of_graph_initializer_relu2_and_init.prototxt"); + "subgraph__multiple_consumers_of_graph_initializer_relu2_and_init.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -680,7 +680,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_relu2 NGRAPH_TEST(onnx_editor, subgraph__invalid_edge_idx) { const auto model_path = - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt"); + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx"); ONNXModelEditor editor{model_path}; try @@ -699,7 +699,7 @@ NGRAPH_TEST(onnx_editor, subgraph__invalid_edge_idx) NGRAPH_TEST(onnx_editor, subgraph__invalid_port_idx) { const auto model_path = - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt"); + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx"); ONNXModelEditor editor{model_path}; try @@ -718,7 +718,7 @@ NGRAPH_TEST(onnx_editor, subgraph__invalid_port_idx) NGRAPH_TEST(onnx_editor, subgraph__inputs_getter) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; EXPECT_EQ(editor.model_inputs(), (std::vector{"data_0", "conv1/7x7_s2_w_0", "conv1/7x7_s2_b_0"})); @@ -731,7 +731,7 @@ NGRAPH_TEST(onnx_editor, subgraph__inputs_getter) NGRAPH_TEST(onnx_editor, subgraph__custom_input_name_already_exist) { const auto model_path = - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt"); + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx"); ONNXModelEditor editor{model_path}; try @@ -752,7 +752,7 @@ NGRAPH_TEST(onnx_editor, subgraph__custom_input_name_already_exist) NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{EditorOutput{"conv1/7x7_s2_2"}}, EditorInput{"conv1/7x7_s2_1"}); @@ -768,7 +768,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_n NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{EditorOutput{"conv1/7x7_s2_2"}}, EditorInput{0}); @@ -789,7 +789,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_i NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{"relu1"}, EditorInput{"conv1/7x7_s2_1"}); @@ -805,7 +805,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_nam NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{"relu1_name"}, EditorInput{0}); EXPECT_EQ(edge.m_node_idx, 0); @@ -819,7 +819,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_ind NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_index_custom_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{"relu1_name"}, EditorInput{0, "custom_input_name_1"}); EXPECT_EQ(edge.m_node_idx, 0); @@ -835,7 +835,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_ind NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_empty_node_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; try { @@ -854,7 +854,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_empty_node_name) NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{EditorOutput{"mul2"}}, EditorOutput{"mul2"}); @@ -881,7 +881,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name) NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name_and_output_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{EditorOutput{"add2"}}, EditorOutput{0}); @@ -902,7 +902,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name_and_output NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{"relu1_name"}, EditorOutput{"relu1"}); @@ -918,7 +918,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_n NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{"relu1_name"}, EditorOutput{0}); EXPECT_EQ(edge.m_node_idx, 0); @@ -932,7 +932,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_i NGRAPH_TEST(onnx_editor, editor_api_select_edge_const_network) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; const InputEdge edge = editor.find_input_edge(EditorNode{EditorOutput{"relu4"}}, EditorInput{0}); @@ -951,7 +951,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_edge_const_network) NGRAPH_TEST(onnx_editor, editor_api_select_edge_error_handling) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; // node with given output name not found try @@ -1032,7 +1032,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_edge_error_handling) NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_but_matched_input) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; InputEdge edge = editor.find_input_edge(EditorNode{"add_ambiguous_name"}, EditorInput{"in2"}); EXPECT_EQ(edge.m_node_idx, 1); @@ -1046,7 +1046,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_but NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and_not_matched_input) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; try { @@ -1074,7 +1074,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and_input_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; try { @@ -1091,7 +1091,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_but_matched_output) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{"add_ambiguous_name"}, EditorOutput{"add1"}); EXPECT_EQ(edge.m_node_idx, 1); @@ -1105,7 +1105,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_bu NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_the_same_node_name_and_output_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")}; const OutputEdge edge = editor.find_output_edge(EditorNode{"add1"}, EditorOutput{0}); EXPECT_EQ(edge.m_node_idx, 0); @@ -1119,7 +1119,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_the_same_node_name_and NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_and_not_matched_output) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; try { @@ -1136,7 +1136,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_an NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_and_output_index) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; try { @@ -1153,7 +1153,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_an NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; // InputEdge{1, "in2"} const auto input_edge_1 = editor.find_input_edge( @@ -1171,7 +1171,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter) const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__existing_inputs_and_outputs_based_extraction.prototxt"); + "subgraph__existing_inputs_and_outputs_based_extraction.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -1196,7 +1196,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter) NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_names) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const auto input_edge_1 = editor.find_input_edge( EditorNode{EditorOutput{"mul2"}}, EditorInput{1, "new_name_1"}); @@ -1208,7 +1208,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_nam const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__use_edge_mapper_with_graph_cutter_custom_names.prototxt"); + "subgraph__use_edge_mapper_with_graph_cutter_custom_names.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -1218,7 +1218,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_nam NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; std::vector output_consumers = editor.find_output_consumers("relu1"); EXPECT_EQ(output_consumers.size(), 3); @@ -1245,7 +1245,7 @@ NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers) NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers_empty_result) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const std::vector output_consumers = editor.find_output_consumers("not_existed"); EXPECT_EQ(output_consumers.size(), 0); @@ -1254,7 +1254,7 @@ NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers_empty_result) NGRAPH_TEST(onnx_editor, editor_api_is_correct_and_unambiguous_node) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; bool is_correct_node = editor.is_correct_and_unambiguous_node(EditorNode{EditorOutput{"relu1"}}); EXPECT_EQ(is_correct_node, true); @@ -1281,7 +1281,7 @@ NGRAPH_TEST(onnx_editor, editor_api_is_correct_and_unambiguous_node) NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")}; const auto edge = editor.find_input_edge(EditorNode{EditorOutput{"Y"}}, EditorInput{1}); editor.cut_graph_fragment({edge}, {}); @@ -1289,7 +1289,7 @@ NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer) const auto ref_model = file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/reference/" - "subgraph__twice_input_edge_from_tensor_with_single_consumer.prototxt"); + "subgraph__twice_input_edge_from_tensor_with_single_consumer.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -1299,7 +1299,7 @@ NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer) NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer_ambiguous) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")}; try { @@ -1318,7 +1318,7 @@ using TestEngine = test::INTERPRETER_Engine; NGRAPH_TEST(onnx_editor, values__append_one_initializer) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.onnx")}; std::map> in_vals; in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {1, 2})); @@ -1334,7 +1334,7 @@ NGRAPH_TEST(onnx_editor, values__append_one_initializer) NGRAPH_TEST(onnx_editor, values__append_two_initializers_to_invalid) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D_invalid.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D_invalid.onnx")}; std::map> in_vals; in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {4, 2})); @@ -1350,7 +1350,7 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_to_invalid) NGRAPH_TEST(onnx_editor, values__modify_one_initializer) { onnx_editor::ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.onnx")}; std::map> in_vals; in_vals.emplace("B", op::Constant::create(element::i64, Shape{2}, {3, 4})); @@ -1365,7 +1365,7 @@ NGRAPH_TEST(onnx_editor, values__modify_one_initializer) NGRAPH_TEST(onnx_editor, values__modify_two_initializers) { onnx_editor::ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.onnx")}; std::map> in_vals; in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {3, 6})); @@ -1381,7 +1381,7 @@ NGRAPH_TEST(onnx_editor, values__modify_two_initializers) NGRAPH_TEST(onnx_editor, values__no_inputs_modify_two_initializers) { onnx_editor::ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers_only.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers_only.onnx")}; std::map> in_vals; in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {1, 2})); @@ -1397,7 +1397,7 @@ NGRAPH_TEST(onnx_editor, values__no_inputs_modify_two_initializers) NGRAPH_TEST(onnx_editor, values__append_two_initializers_change_shape_type) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.onnx")}; std::map> in_vals; in_vals.emplace("A", op::Constant::create(element::i8, Shape{2, 1}, {-1, 1})); @@ -1413,7 +1413,7 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_change_shape_type) NGRAPH_TEST(onnx_editor, values__append_two_initializers_mixed_types) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.onnx")}; std::map> in_vals; in_vals.emplace("data", @@ -1430,14 +1430,14 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_mixed_types) NGRAPH_TEST(onnx_editor, combined__cut_and_replace_shape) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")}; const auto new_shape = PartialShape({1, 64, 112, 112}); editor.cut_graph_fragment({{InputEdge(1, 0)}}, {}); editor.set_input_shapes({{"conv1/7x7_s2_1", new_shape}}); const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -1451,12 +1451,12 @@ NGRAPH_TEST(onnx_editor, combined__cut_and_replace_shape) NGRAPH_TEST(onnx_editor, cut_operator_with_no_schema) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/unknown_input_value_info.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/unknown_input_value_info.onnx")}; editor.cut_graph_fragment({{InputEdge{1, 0}}}, {}); const auto ref_model = file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/reference/unknown_input_value_info.prototxt"); + SERIALIZED_ZOO, "onnx/model_editor/reference/unknown_input_value_info.onnx"); const auto result = compare_onnx_models(editor.model_string(), ref_model); @@ -1466,7 +1466,7 @@ NGRAPH_TEST(onnx_editor, cut_operator_with_no_schema) NGRAPH_TEST(onnx_editor, is_model_input) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; EXPECT_TRUE(editor.is_input(InputEdge{0, 0})); const auto edge1 = editor.find_input_edge(EditorOutput{"add1"}, 1); @@ -1485,7 +1485,7 @@ NGRAPH_TEST(onnx_editor, is_model_input) NGRAPH_TEST(onnx_editor, is_model_output) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; EXPECT_TRUE(editor.is_output(OutputEdge{4, 0})); EXPECT_TRUE(editor.is_output(OutputEdge{5, 1})); @@ -1502,7 +1502,7 @@ NGRAPH_TEST(onnx_editor, is_model_output) NGRAPH_TEST(onnx_editor, model_inputs) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const auto inputs = editor.model_inputs(); EXPECT_TRUE(inputs == (std::vector{"in1", "in2", "in3"})); // in4 is initializer @@ -1511,7 +1511,7 @@ NGRAPH_TEST(onnx_editor, model_inputs) NGRAPH_TEST(onnx_editor, model_inputs_with_non_input_initializers) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/instance_norm_dynamic.prototxt")}; + SERIALIZED_ZOO, "onnx/instance_norm_dynamic.onnx")}; const auto inputs = editor.model_inputs(); EXPECT_TRUE(inputs == (std::vector{"input"})); @@ -1520,7 +1520,7 @@ NGRAPH_TEST(onnx_editor, model_inputs_with_non_input_initializers) NGRAPH_TEST(onnx_editor, model_output) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; const auto outputs = editor.model_outputs(); EXPECT_TRUE(outputs == (std::vector{"mul1", "split2", "mul2"})); @@ -1529,7 +1529,7 @@ NGRAPH_TEST(onnx_editor, model_output) NGRAPH_TEST(onnx_editor, get_tensor_shape) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; EXPECT_EQ(editor.get_tensor_shape("mul2"), (PartialShape{1, 1, 2, 2})); EXPECT_EQ(editor.get_tensor_shape("in1"), (PartialShape{2, 2})); @@ -1553,7 +1553,7 @@ NGRAPH_TEST(onnx_editor, get_tensor_shape) NGRAPH_TEST(onnx_editor, get_tensor_shape_after_modification) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; EXPECT_EQ(editor.get_tensor_shape("in3"), (PartialShape{1, 1, 2, 2})); EXPECT_EQ(editor.get_tensor_shape("conv1"), (PartialShape{1, 1, 2, 2})); @@ -1566,7 +1566,7 @@ NGRAPH_TEST(onnx_editor, get_tensor_shape_after_modification) NGRAPH_TEST(onnx_editor, is_correct_tensor_name) { ONNXModelEditor editor{file_util::path_join( - SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")}; + SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")}; EXPECT_TRUE(editor.is_correct_tensor_name("in1")); EXPECT_TRUE(editor.is_correct_tensor_name("relu1")); diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index f16e0f2dc45..f4eb93c1e93 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -55,7 +55,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_test_test_case) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1}); @@ -68,7 +68,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_test_test_case) NGRAPH_TEST(${BACKEND_NAME}, onnx_test_test_case_mutliple_inputs) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.onnx")); auto test_case = test::TestCase(function); test_case.add_multiple_inputs(Inputs{{1}, {2}, {3}}); @@ -79,7 +79,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_test_test_case_mutliple_inputs) NGRAPH_TEST(${BACKEND_NAME}, onnx_output_names_check) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.onnx")); std::size_t size = function->get_output_size(); for (std::size_t i{0}; i < size; ++i) @@ -92,7 +92,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_output_names_check) NGRAPH_TEST(${BACKEND_NAME}, onnx_node_names_check) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.onnx")); // Filter out Add nodes from the function graph std::vector> additions; @@ -112,17 +112,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_node_names_check) std::unordered_set{"Y"}); } -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_abc) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc.prototxt")); - - auto test_case = test::TestCase(function); - test_case.add_multiple_inputs(Inputs{{1}, {2}, {3}}); - test_case.add_expected_output(Shape{1}, std::vector{6}); - test_case.run(); -} - NGRAPH_TEST(${BACKEND_NAME}, onnx_model_binary_add_abc) { auto function = @@ -137,7 +126,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_binary_add_abc) NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_const_op) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/bool_const_op.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/bool_const_op.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(std::vector{1, 0, 0, 1}); @@ -147,7 +136,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_const_op) NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_init_and) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/bool_init_and.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/bool_init_and.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(std::vector{1}); @@ -157,7 +146,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_init_and) NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_input_or) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/bool_input_or.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/bool_input_or.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{true, false, true, false}); @@ -169,7 +158,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_input_or) NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_init_raw) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/bool_init_raw.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/bool_init_raw.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(std::vector{true, false, true}); @@ -179,7 +168,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_bool_init_raw) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_abc_initializers) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_initializers.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_initializers.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4}); @@ -202,7 +191,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_override_op) }); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/override_op.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/override_op.onnx")); Inputs inputs; inputs.emplace_back(std::vector{0.f, 1.f, 2.f, 3.f}); @@ -233,7 +222,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsupported_op) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/unsupported_op.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/unsupported_op.onnx")); FAIL() << "Expected ngraph::ngraph_error"; } catch (ngraph::ngraph_error const& err) @@ -258,7 +247,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op) }); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); @@ -275,7 +264,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_register_unregister) }); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); @@ -286,7 +275,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_register_unregister) try { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator.onnx")); FAIL() << "Expected ngraph::ngraph_error"; } catch (ngraph::ngraph_error const& err) @@ -309,7 +298,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_default_domain) }); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator_default_domain.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/custom_operator_default_domain.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); @@ -359,7 +348,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_op_domain) EXPECT_TRUE(onnx_import::is_operator_supported("CustomAdd", 1, "custom.op")); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/missing_op_domain.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/missing_op_domain.onnx")); Inputs inputs; inputs.emplace_back(std::vector{0.f, 1.f, 2.f, 3.f}); @@ -375,7 +364,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unknown_domain) { // the importer should not throw when it encounters an unknown domain in the model EXPECT_NO_THROW(onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/unknown_domain.prototxt"))); + file_util::path_join(SERIALIZED_ZOO, "onnx/unknown_domain.onnx"))); } NGRAPH_TEST(${BACKEND_NAME}, onnx_model_op_in_unknown_domain) @@ -383,7 +372,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_op_in_unknown_domain) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/unknown_domain_add.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/unknown_domain_add.onnx")); FAIL() << "The onnx_importer did not throw for unknown domain and op"; } @@ -433,7 +422,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input) }); auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/missing_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/missing_input.onnx")); Inputs inputs{{1, 2, 3, 4}, {5, 6, 7, 8}}; @@ -447,7 +436,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_initializer_wo_input) { // This test checks a model which has an initializer, but no input with the same name auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/initializer_wo_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/initializer_wo_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5}); @@ -458,7 +447,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_initializer_wo_input) NGRAPH_TEST(onnx_${BACKEND_NAME}, onnx_expand_function) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantization/dynamicquantizelinear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantization/dynamicquantizelinear.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.f, -2.1f, -1.3f, -2.5f, -3.34f, -4.f}); @@ -472,7 +461,7 @@ NGRAPH_TEST(onnx_${BACKEND_NAME}, onnx_expand_function) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_addmul_abc) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/addmul_abc.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/addmul_abc.onnx")); auto test_case = test::TestCase(function); test_case.add_input({9, 10, 11, 12}); @@ -485,7 +474,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_addmul_abc) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_no_keepdims) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_no_keepdims.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_no_keepdims.onnx")); auto test_case = test::TestCase(function); test_case.add_input({2, 1, 3, 10}); @@ -497,7 +486,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_batch_norm_default) { // Batch Normalization with default parameters auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/batchnorm_default.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/batchnorm_default.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.f, 0.f, 1.f, 2.f, 3.f, 4.f}); // data {1, 2, 1, 3} @@ -514,7 +503,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_relu) { // Simple ReLU test auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/relu.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/relu.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1, -2, 0, 1, 2, 3}); @@ -526,7 +515,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum_opset1) { // Simple Sum test for opset1. auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sum_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sum_opset1.onnx")); auto test_case = test::TestCase(function); test_case.add_input({3.f, 0.f, 2.f}); @@ -540,7 +529,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum) { // Simple Sum test for opset8. auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sum.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sum.onnx")); auto test_case = test::TestCase(function); test_case.add_input({3.f}); @@ -553,7 +542,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum_one_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sum_one_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sum_one_input.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -565,7 +554,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum_one_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_1d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_1d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_1d.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f}); @@ -576,7 +565,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_1d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_2d_axis_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_2d_axis_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_2d_axis_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f}); @@ -587,7 +576,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_2d_axis_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_2d_dynamic_axis_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_2d_dynamic_axis_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_2d_dynamic_axis_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f}); @@ -599,7 +588,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_2d_dynamic_axis_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_3d_exclusive_reverse) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_3d_exclusive_reverse.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/cum_sum_3d_exclusive_reverse.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, @@ -614,7 +603,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cum_sum_3d_exclusive_reverse) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_min_two_inputs_opset1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/min_two_inputs_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/min_two_inputs_opset1.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -627,7 +616,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_min_two_inputs_opset1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_min_two_inputs) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/min_two_inputs.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/min_two_inputs.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -640,7 +629,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_min_two_inputs) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_opset1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/max_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/max_opset1.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -655,7 +644,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_opset1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/max.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/max.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -670,7 +659,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mean_opset1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mean_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mean_opset1.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -685,7 +674,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mean_opset1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mean) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/mean.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/mean.onnx")); // input data shape (3, ) auto test_case = test::TestCase(function); @@ -700,7 +689,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mean) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gemm_abc) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gemm_abc.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gemm_abc.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray( @@ -732,7 +721,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gemm_abc) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/matmul.onnx")); std::vector> inputs; @@ -755,7 +744,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_0D) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_0D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_0D.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output({1.0}); @@ -765,7 +754,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_0D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_1D) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_1D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_1D.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.0, 0.0, 1.0}); @@ -792,7 +781,7 @@ namespace NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_axis_0) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_0.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_0.onnx")); auto test_case = test::TestCase(function); test_case.add_input(SOFTMAX_INPUT); @@ -817,7 +806,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_axis_0) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_axis_1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_1.onnx")); auto test_case = test::TestCase(function); test_case.add_input(SOFTMAX_INPUT); @@ -842,7 +831,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_invalid_axis_1D) { ASSERT_THROW(onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_invalid_axis_1D.prototxt")), + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_invalid_axis_1D.onnx")), ngraph::ngraph_error) << "Softmax model with invalid axis was successfully imported while it should have thrown."; } @@ -850,7 +839,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_invalid_axis_1D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_invalid_axis_3D) { ASSERT_THROW(onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_invalid_axis_3D.prototxt")), + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_invalid_axis_3D.onnx")), ngraph::ngraph_error) << "Softmax model with invalid axis was successfully imported while it should have thrown."; } @@ -858,7 +847,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softmax_invalid_axis_3D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sub.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sub.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray({{{1, 2, 3}}}).get_vector()); @@ -876,7 +865,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/div.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/div.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray({{{1, 2, 3}}}).get_vector()); @@ -893,7 +882,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_bcast) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_bcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_bcast.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray( @@ -920,7 +909,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_bcast) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_nonmaxsuppression_center_point_box_format) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/nonmaxsuppression_center_point_box_format.prototxt")); + SERIALIZED_ZOO, "onnx/nonmaxsuppression_center_point_box_format.onnx")); auto test_case = test::TestCase(function); @@ -939,7 +928,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_nonmaxsuppression_center_point_box_forma NGRAPH_TEST(${BACKEND_NAME}, onnx_model_nonmaxsuppression_single_box) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/nonmaxsuppression_single_box.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/nonmaxsuppression_single_box.onnx")); auto test_case = test::TestCase(function); @@ -956,7 +945,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_nonmaxsuppression_single_box) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_log_sum) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_log_sum.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_log_sum.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -975,7 +964,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_log_sum) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_log_sum_exp) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_log_sum_exp.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_log_sum_exp.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -994,7 +983,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_log_sum_exp) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_l1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_l1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_l1.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1013,7 +1002,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_l1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_l2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_l2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_l2.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1032,7 +1021,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_l2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_max) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_max.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_max.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1051,14 +1040,14 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_max) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_max_invalid_axes) { EXPECT_THROW(onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_max_invalid_axes.prototxt")), + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_max_invalid_axes.onnx")), ngraph::ngraph_error); } NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_mean) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_mean.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_mean.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1077,7 +1066,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_mean) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_min) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_min.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_min.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1096,7 +1085,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_min) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_prod) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_prod.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_prod.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1115,7 +1104,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_prod) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1134,7 +1123,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_dynamic_rank_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_dynamic_rank_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_dynamic_rank_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 1, 4, 4}, {1.0f, @@ -1161,7 +1150,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_dynamic_rank_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_square) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_square.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_square.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{ @@ -1180,7 +1169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_square) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant.onnx")); Inputs inputs{test::NDArray({{{{1.0f, 1.0f, 1.0f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}, @@ -1199,7 +1188,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant_single_axis) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant_single_axis.prototxt")); + SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant_single_axis.onnx")); Inputs inputs{ test::NDArray({{{1, 2, 3}, {4, 5, 6}}, {{7, 8, 9}, {10, 11, 12}}}).get_vector()}; @@ -1215,7 +1204,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant_single_ax NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant_keepdims_off) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant_keepdims_off.prototxt")); + SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_constant_keepdims_off.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs{test::NDArray({{{{1.0f, 1.0f, 1.0f, 1.0f}, @@ -1235,7 +1224,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_constant_keepdims_ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f, 4.0f}); @@ -1248,7 +1237,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_0_dim_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_0_dim_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_as_0_dim_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -1263,7 +1252,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_as_0_dim_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_input_dynamic) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_input_dynamic.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_input_dynamic.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}); @@ -1276,7 +1265,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_input_dynamic) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, @@ -1303,7 +1292,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_dynamic_rank_input) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_dynamic_rank_input.prototxt")); + SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_dynamic_rank_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 1, 4, 4}, @@ -1331,7 +1320,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_dynamic_rank_in NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_with_noop) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_with_noop.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_with_noop.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, @@ -1374,7 +1363,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_with_noop) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_without_noop) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_without_noop.prototxt")); + SERIALIZED_ZOO, "onnx/reduce_sum_13_axes_empty_without_noop.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, @@ -1402,7 +1391,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reduce_sum_13_axes_empty_without_noop) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_asymertic_last_dim) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_asymertic_last_dim.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_asymertic_last_dim.onnx")); auto test_case = test::TestCase(function); std::vector input_data{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; @@ -1416,7 +1405,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_asymertic_last_dim) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_asymertic_dim_in_the_middle) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_asymertic_dim_in_the_middle.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_asymertic_dim_in_the_middle.onnx")); auto test_case = test::TestCase(function); std::vector input_data{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; @@ -1435,7 +1424,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_empty_constant_as_input) // this node is connected to the "roi" input of the Resize op but this input should be // ignored since the Resize coordinate_transformation_mode is set to asymmetric const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_empty_constant_as_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_empty_constant_as_input.onnx")); auto test_case = test::TestCase(function); std::vector input_data{1.0f, 3.0f, 4.0f, 8.0f, 6.0f, 2.0f, 7.0f, 11.0f}; @@ -1456,7 +1445,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_empty_constant_as_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_down_scales_const_nearest) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_down_scales_const_nearest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_down_scales_const_nearest.onnx")); // Input data shape (1, 1, 2, 4) // Input const scales values {1.0, 1.0, 0.6, 0.6} @@ -1472,7 +1461,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_down_scales_const_nearest) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_up_scales_const_linear) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_up_scales_const_linear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_up_scales_const_linear.onnx")); // Input data shape (1, 1, 2, 2) // Input const scales values {1.0, 1.0, 2.0, 2.0} @@ -1490,7 +1479,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_up_scales_const_linear) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_up_scales_const_nearest) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_up_scales_const_nearest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize10_up_scales_const_nearest.onnx")); // Input data shape (1, 1, 2, 2) // Input const scales values {1.0, 1.0, 2.0, 3.0} @@ -1509,7 +1498,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize10_up_scales_const_nearest) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_scales_linear_asymmetric) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_down_scales_linear_asymmetric.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_down_scales_linear_asymmetric.onnx")); const Shape expected_output_shape{1, 1, 1, 2}; auto test_case = test::TestCase(function); @@ -1525,7 +1514,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_scales_linear_asymmetric) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_scales_nearest_asymmetric_floor_dynamic_sizes) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_scales_nearest_asymmetric_floor_dynamic_scales.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_scales_nearest_asymmetric_floor_dynamic_scales.onnx")); const Shape expected_output_shape{2, 1, 4, 1}; auto test_case = test::TestCase(function); @@ -1543,7 +1532,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_scales_nearest_asymmetric_floor_dynam NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_linear_asymmetric) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_scales_linear_asymmetric.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_scales_linear_asymmetric.onnx")); const Shape expected_output_shape{2, 1, 4, 8}; auto test_case = test::TestCase(function); @@ -1565,7 +1554,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_linear_asymmetric) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_scales_nearest_asymmetric_floor) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_scales_nearest_asymmetric_floor.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_scales_nearest_asymmetric_floor.onnx")); const Shape expected_output_shape{2, 1, 4, 1}; auto test_case = test::TestCase(function); @@ -1580,7 +1569,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_scales_nearest_asymmetric_floor) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_cubic_align_corners) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_scales_cubic_align_corners.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_scales_cubic_align_corners.onnx")); const Shape expected_output_shape{1, 1, 8, 8}; auto test_case = test::TestCase(function); @@ -1622,7 +1611,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_cubic_align_corners) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_tf_half_pixel) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_scales_tf_half_pixel.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_scales_tf_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 8, 8}; auto test_case = test::TestCase(function); @@ -1659,7 +1648,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_scales_tf_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_all_attributes_default) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_all_attributes_default.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_all_attributes_default.onnx")); const Shape expected_output_shape{1, 1, 7, 8}; auto test_case = test::TestCase(function); @@ -1677,7 +1666,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_all_attributes_default) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_sizes_nearest_asymmetric_floor) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_sizes_nearest_asymmetric_floor.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_sizes_nearest_asymmetric_floor.onnx")); const Shape expected_output_shape{2, 1, 4, 1}; auto test_case = test::TestCase(function); @@ -1692,7 +1681,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_sizes_nearest_asymmetric_floor) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_linear_asymmetric) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_sizes_linear_asymmetric.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_sizes_linear_asymmetric.onnx")); const Shape expected_output_shape{2, 1, 4, 8}; auto test_case = test::TestCase(function); @@ -1712,7 +1701,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_linear_asymmetric) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_cubic_half_pixel) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_down_sizes_cubic_half_pixel.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_down_sizes_cubic_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 3, 3}; auto test_case = test::TestCase(function); @@ -1750,7 +1739,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_cubic_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_linear_pytorch_half_pixel) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_down_sizes_linear_pytorch_half_pixel.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_down_sizes_linear_pytorch_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 3, 1}; auto test_case = test::TestCase(function); @@ -1779,7 +1768,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_linear_pytorch_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_cubic_half_pixel) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_sizes_cubic_half_pixel.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_up_sizes_cubic_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 9, 10}; auto test_case = test::TestCase(function); @@ -1823,7 +1812,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_cubic_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_cubic_half_pixel_dynamic_sizes) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_cubic_half_pixel_dynamic_sizes.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_cubic_half_pixel_dynamic_sizes.onnx")); const Shape expected_output_shape{1, 1, 9, 10}; auto test_case = test::TestCase(function); @@ -1868,7 +1857,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_cubic_half_pixel_dynamic_siz NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_round_prefer_floor_half_pixel) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_round_prefer_floor_half_pixel.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_round_prefer_floor_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 7, 8}; auto test_case = test::TestCase(function); @@ -1886,7 +1875,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_round_prefer_floor_h NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_prefer_ceil_asymmetric) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_prefer_ceil_asymmetric.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_prefer_ceil_asymmetric.onnx")); const Shape expected_output_shape{1, 1, 8, 8}; auto test_case = test::TestCase(function); @@ -1923,7 +1912,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_prefer_ceil_asymmetr NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_ceil_half_pixel) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_ceil_half_pixel.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_ceil_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 8, 8}; auto test_case = test::TestCase(function); @@ -1957,7 +1946,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_ceil_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_floor_align_corners) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_floor_align_corners.prototxt")); + SERIALIZED_ZOO, "onnx/resize11_up_sizes_nearest_floor_align_corners.onnx")); const Shape expected_output_shape{1, 1, 8, 8}; auto test_case = test::TestCase(function); @@ -1991,7 +1980,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_up_sizes_nearest_floor_align_corners) NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_tf_half_pixel) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_down_sizes_tf_half_pixel.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/resize11_down_sizes_tf_half_pixel.onnx")); const Shape expected_output_shape{1, 1, 3, 2}; auto test_case = test::TestCase(function); @@ -2020,7 +2009,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_resize11_down_sizes_tf_half_pixel) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shape) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/shape.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/shape.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray( @@ -2038,7 +2027,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_elu) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/elu.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/elu.onnx")); Inputs inputs; inputs.emplace_back( @@ -2087,7 +2076,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_elu) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_leaky_relu) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/leaky_relu.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/leaky_relu.onnx")); Inputs inputs; inputs.emplace_back( @@ -2120,7 +2109,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_leaky_relu) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_nd) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu.onnx")); Inputs inputs; inputs.emplace_back( @@ -2152,7 +2141,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_nd) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_batch_nd_elementwise) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_batch_nd.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_batch_nd.onnx")); Inputs inputs; // Shape{2, 3, 4, 5} @@ -2197,7 +2186,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_batch_nd_elementwise) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_1d) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_1d.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_1d.onnx")); Inputs inputs; // Shape{2, 3, 4, 5} @@ -2236,7 +2225,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_1d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_C_1_1) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_c_1_1.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/prelu_c_1_1.onnx")); Inputs inputs; // Shape{2, 3, 4, 5} @@ -2275,7 +2264,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_prelu_C_1_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_selu) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/selu.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/selu.onnx")); Inputs inputs; inputs.emplace_back( @@ -2318,7 +2307,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_selu) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sigmoid) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sigmoid.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sigmoid.onnx")); Inputs inputs; inputs.emplace_back( @@ -2395,7 +2384,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sigmoid) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_tanh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tanh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tanh.onnx")); Inputs inputs; inputs.emplace_back( @@ -2472,7 +2461,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_tanh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_thresholded_relu) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/thresholded_relu.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/thresholded_relu.onnx")); Inputs inputs; inputs.emplace_back( @@ -2498,7 +2487,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_thresholded_relu) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_vec_ten3d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_vec_ten3d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_vec_ten3d.onnx")); Inputs inputs; inputs.emplace_back(std::vector{0.f, 1.f}); @@ -2516,7 +2505,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_vec_ten3d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softplus) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softplus.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softplus.onnx")); // -1.0f, 0, 1.0f, 10.f, normal input values for activation // 100.0f, -100.0f, 1000.0f, -1000.0f, input values that leads to exp() overflow @@ -2560,7 +2549,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softplus) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softplus_infinity) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softplus.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softplus.onnx")); std::vector input(13, std::numeric_limits::infinity()); std::vector expected_output(13, std::numeric_limits::infinity()); @@ -2574,7 +2563,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_softplus_infinity) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum_opset8) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sum_opset8.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sum_opset8.onnx")); Inputs inputs; inputs.emplace_back(std::vector{1.0f, 2.0f, 3.0f}); @@ -2599,7 +2588,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sum_opset8) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_int32) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_int32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); @@ -2610,7 +2599,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_int32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_int32) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_int32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); @@ -2621,7 +2610,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_int32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_float) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_float.onnx")); auto test_case = test::TestCase(function); test_case.add_input({4, 0.1, 2, 3, -3, 1, -0.9, 0, 1, 2, 3, 0}); @@ -2632,7 +2621,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_float) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_float) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_float.onnx")); auto test_case = test::TestCase(function); test_case.add_input({4, 0.1, 2, 3, -3, 1, -0.9, 0, 1, 2, 3, 0}); @@ -2643,7 +2632,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_float) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_select_last_index) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_select_last_index.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmax_select_last_index.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{4, 3}, {1, 1, 1, 0.5, 3, 4, 0.5, 1, 1.1, 0, 3, 0}); @@ -2654,7 +2643,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmax_select_last_index) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_select_last_index) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_select_last_index.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/argmin_select_last_index.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{4, 3}, {1, 1, 1, 2, 3, 4, 2, 1, 1.1, 3, 3, 8}); @@ -2665,7 +2654,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_argmin_select_last_index) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_top_k) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); @@ -2678,7 +2667,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_top_k) NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_10) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_10.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_10.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); @@ -2693,7 +2682,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_10) NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_10_const_k) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_10_const_k.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_10_const_k.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); @@ -2707,7 +2696,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_10_const_k) NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_11_const_k_smallest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/top_k_opset_11_const_k_smallest.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 11, 10, 9, 8}); @@ -2721,7 +2710,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest) NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest_negative_axis) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt")); + SERIALIZED_ZOO, "onnx/top_k_opset_11_const_k_smallest_negative_axis.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 11, 10, 9, 8}); @@ -2735,7 +2724,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest_negative_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_acosh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/acosh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/acosh.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {1.0f, 2.5f, 4.3f}); @@ -2747,7 +2736,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_acosh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_asinh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/asinh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/asinh.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {-1.0f, 0.0f, 1.0f}); @@ -2759,7 +2748,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_asinh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_atanh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/atanh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/atanh.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {-0.9f, 0.0f, 0.9f}); @@ -2771,7 +2760,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_atanh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sinh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sinh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sinh.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.0f, 0.0f, 1.0f}); @@ -2782,7 +2771,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sinh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cosh) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/cosh.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/cosh.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.0f, 0.0f, 1.0f}); @@ -2793,7 +2782,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_cosh) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sign) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sign.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/sign.onnx")); Inputs inputs{std::vector{-std::numeric_limits::infinity(), -3.141592f, @@ -2810,7 +2799,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sign) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_one_hot_with_axis) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/one_hot_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/one_hot_axis.onnx")); Inputs inputs{{1.0, 9.0, 2.0, 4.0}, {1.0, 3.0}}; std::vector expected_output{{1.0, 1.0, 3.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, @@ -2827,7 +2816,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_one_hot_with_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_one_hot_without_axis) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/one_hot_no_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/one_hot_no_axis.onnx")); std::vector> inputs{{0, 7, 8}, {2, 5}}; std::vector expected_output{5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -2842,7 +2831,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_one_hot_without_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_where) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/where.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/where.onnx")); // conditions tensor - 3x3x3 auto condition = std::vector{ @@ -2871,7 +2860,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_where) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_erf) { const auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/erf.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/erf.onnx")); Inputs inputs; inputs.emplace_back(test::NDArray{ @@ -2893,7 +2882,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_erf) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_erf_int32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/erf_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/erf_int32.onnx")); const std::vector> inputs{ {-std::numeric_limits::max(), -1, 0, 1, std::numeric_limits::max()}}; @@ -2909,7 +2898,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_erf_int32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shrink_float) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/shrink_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/shrink_float.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -2923,7 +2912,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shrink_float) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shrink_int) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/shrink_int.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/shrink_int.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5}); @@ -2935,7 +2924,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_shrink_int) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_p1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_p1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_p1.onnx")); Shape data_shape{2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -2955,7 +2944,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_p1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_p2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_p2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_p2.onnx")); Shape data_shape{2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -2975,7 +2964,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_p2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_default) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_default.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_default.onnx")); Shape data_shape{2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -2995,7 +2984,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_default) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_default_dynamic) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_default_dynamic.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lp_norm_default_dynamic.onnx")); Shape data_shape{2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -3015,7 +3004,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lp_norm_default_dynamic) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm.onnx")); Shape data_shape{1, 2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -3038,7 +3027,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization) NGRAPH_TEST(${BACKEND_NAME}, onnx_instance_normalization_dynamic) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_dynamic.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_dynamic.onnx")); auto test_case = test::TestCase(function); std::vector input_data{1.f, 2.f, 3.f}; @@ -3051,7 +3040,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_instance_normalization_dynamic) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_eye_like) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/eye_like.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/eye_like.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output( @@ -3063,7 +3052,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_eye_like) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_0_batch_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reverse_sequence_time_0_batch_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reverse_sequence_time_0_batch_1.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -3079,7 +3068,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_0_batch_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_1_batch_0) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reverse_sequence_time_1_batch_0.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reverse_sequence_time_1_batch_0.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -3095,7 +3084,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_1_batch_0) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_incorrect_batch_axis) { EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reverse_sequence_incorrect_batch_axis.prototxt")), + SERIALIZED_ZOO, "onnx/reverse_sequence_incorrect_batch_axis.onnx")), ngraph_error) << "ReverseSequence batch_axis attribute can only equal 0 or 1. Value of '2' is not " "accepted."; @@ -3104,7 +3093,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_incorrect_batch_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_incorrect_time_axis) { EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reverse_sequence_incorrect_time_axis.prototxt")), + SERIALIZED_ZOO, "onnx/reverse_sequence_incorrect_time_axis.onnx")), ngraph_error) << "ReverseSequence time_axis attribute can only equal 0 or 1. Value of '2' is not " "accepted."; @@ -3113,7 +3102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_incorrect_time_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_time_and_batch_axis_equal) { EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/reverse_sequence_time_and_batch_axis_equal.prototxt")), + SERIALIZED_ZOO, "onnx/reverse_sequence_time_and_batch_axis_equal.onnx")), ngraph_error) << "ReverseSequence 'time_axis' and 'batch_axis' can't be equal."; } @@ -3121,7 +3110,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reverse_sequence_time_and_batch_axis_equ NGRAPH_TEST(${BACKEND_NAME}, onnx_matmul_float_type) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_float.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{0, 1, 2, 3, 4, 5}); @@ -3134,7 +3123,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_matmul_float_type) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-4, 7, 5, 4, -7, 8}); @@ -3147,7 +3136,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_i64) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_i64.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_i64.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-4, 7, 5, 4, -7, 8}); @@ -3160,7 +3149,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_i64) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_broadcast) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_broadcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_broadcast.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-8, 3, 4, 9, -17, 1}); @@ -3175,7 +3164,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_f32) try { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_f32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_f32.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -3194,7 +3183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_f32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_fmod) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-8, 3, 4, 9, -17, 1}); @@ -3207,7 +3196,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_fmod) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_fmod_broadcast) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod_broadcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod_broadcast.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-8, 3, 4, 9, -17, 1}); @@ -3220,7 +3209,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_fmod_broadcast) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_sign_fmod_f32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod_f32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_sign_fmod_f32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-4.3, 7.2, 5.0, 4.3, -7.2, 8.0}); @@ -3236,7 +3225,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_incorrect_fmod) try { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mod_incorrect_fmod.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mod_incorrect_fmod.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -3253,7 +3242,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mod_incorrect_fmod) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatterND_param_i64_indices) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_nd_param_i64_indices.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_nd_param_i64_indices.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f}); @@ -3267,7 +3256,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatterND_param_i64_indices) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatterND_const_i32_indices) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_nd_const_i32_indices.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_nd_const_i32_indices.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f}); @@ -3280,7 +3269,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatterND_const_i32_indices) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_1D) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_1D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_1D.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3}, {1, 2, 3}); @@ -3293,7 +3282,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_1D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_int8_axis_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_int8_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_int8_axis_1.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 2}, {1, 2, 3, 4}); @@ -3306,7 +3295,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_int8_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_int32_axis_0) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_int32_axis_0.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_int32_axis_0.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3, 3}, {1, 2, 3, 4, 5, 6, 7, 8, 9}); @@ -3319,7 +3308,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_int32_axis_0) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_negative_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_negative_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_negative_axis.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 2}, {1, 2, 3, 4}); @@ -3332,7 +3321,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_negative_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_3D_axis_2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 2, 2}, {1, 2, 3, 4, 5, 6, 7, 8}); @@ -3345,7 +3334,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gather_elements_float_3D_axis_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gatherND_int32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gatherND_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gatherND_int32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3}); @@ -3358,7 +3347,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gatherND_int32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gatherND_float) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gatherND_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gatherND_float.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}); @@ -3371,7 +3360,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_gatherND_float) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pad_constant) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/pad_constant.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/pad_constant.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 1.2f, 2.3f, 3.4f, 4.5f, 5.7f}); @@ -3384,7 +3373,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pad_constant) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_float32_float32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/pow_float32_float32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/pow_float32_float32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); // base @@ -3398,7 +3387,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_float32_float32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_float32_int32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/pow_float32_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/pow_float32_int32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); // base @@ -3412,7 +3401,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_float32_int32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_int32_float32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/pow_int32_float32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/pow_int32_float32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4}); // base @@ -3426,7 +3415,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_pow_int32_float32) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reciprocal) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reciprocal.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reciprocal.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f, 5.f, 6.f}); @@ -3439,7 +3428,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reciprocal) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_round) { const auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/round.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/round.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -3453,7 +3442,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_round) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_round_half_nearest_even) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/round_half_nearest_even.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/round_half_nearest_even.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.5f, 2.5f, -1.5f, -2.5f}); @@ -3465,7 +3454,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_round_half_nearest_even) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatter10_import_only) { const auto scatter_fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_opset10.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_opset10.onnx")); const Shape data_shape{2, 2}; @@ -3478,7 +3467,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatter10_import_only) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_scatter_elements_import_only) { const auto scatter_fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.onnx")); const Shape data_shape{1, 5}; @@ -3492,7 +3481,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample6_nearest_infer) { // clang-format off const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_nearest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_nearest.onnx")); // height_scale: 2.0 // width_scale: 3.0 // mode: nearest @@ -3516,7 +3505,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample6_bilinear_infer) { // clang-format off const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_bilinear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_bilinear.onnx")); // height_scale: 2.0 // width_scale: 3.0 // mode: bilinear @@ -3540,7 +3529,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample6_dynamic) { // clang-format off const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_dynamic.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample6_dynamic.onnx")); // height_scale: 1.5 // width_scale: 2.5 // mode: nearest @@ -3564,7 +3553,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample6_dynamic) NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample8_nearest_infer) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample8_nearest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample8_nearest.onnx")); // Input data shape (1, 1, 2, 2) // Scales attribute values {1.0, 1.0, 2.0, 3.0} @@ -3582,7 +3571,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample8_nearest_infer) NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample8_linear_infer) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample8_linear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample8_linear.onnx")); // Input data shape (1, 1, 2, 2) // Scales attribute values {1.0, 1.0, 2.0, 2.0} @@ -3600,7 +3589,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample8_linear_infer) NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_const_nearest_infer) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_const_nearest.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_const_nearest.onnx")); // Input data shape (1, 1, 2, 2) // Input const scales values {1.0, 1.0, 2.0, 3.0} @@ -3618,7 +3607,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_const_nearest_infer) NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_const_linear_infer) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_const_linear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_const_linear.onnx")); // Input data shape (1, 1, 2, 2) // Input const scales values {1.0, 1.0, 2.0, 2.0} @@ -3636,7 +3625,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_const_linear_infer) NGRAPH_TEST(${BACKEND_NAME}, onnx_image_scaler) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/image_scaler.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/image_scaler.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0, 2.0, 3.0, 4.0, 10.0, 20.0, 30.0, 40.0}); @@ -3648,7 +3637,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_image_scaler) NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_single) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_single.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_single.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 3}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}); @@ -3659,7 +3648,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_single) NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_end) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_end.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_end.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0, 2.0, 3.0, 4.0}); @@ -3670,7 +3659,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_end) NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_middle) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_middle.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_middle.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0, 2.0, 3.0, 4.0}); @@ -3681,7 +3670,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_middle) NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_on_input_graph_middle) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_on_input_graph_middle.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_on_input_graph_middle.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 2, 4, 1, 3}, @@ -3699,7 +3688,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_empty_initializers_handling) // this input should be ignored since the "sizes" optional input is provided // and the inference should use the data from the latter const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/empty_initializers_handling.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/empty_initializers_handling.onnx")); const Shape expected_output_shape{2, 1, 4, 8}; auto test_case = test::TestCase(function); @@ -3719,7 +3708,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_empty_initializers_handling) NGRAPH_TEST(${BACKEND_NAME}, onnx_roi_align_f32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/roi_align_f32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/roi_align_f32.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., @@ -3761,7 +3750,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_roi_align_f32) NGRAPH_TEST(${BACKEND_NAME}, quant_dequant_pattern) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quant_dequant_pattern.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quant_dequant_pattern.onnx")); auto test_case = test::TestCase(function); // scale == 3.0 // zero point == 10 @@ -3774,7 +3763,7 @@ NGRAPH_TEST(${BACKEND_NAME}, quant_dequant_pattern) NGRAPH_TEST(${BACKEND_NAME}, quant_dequant_pattern_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quant_dequant_pattern_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quant_dequant_pattern_axis.onnx")); auto test_case = test::TestCase(function); // axis = 1 // scale == {2.0, 3.0, 4.0} @@ -3788,7 +3777,7 @@ NGRAPH_TEST(${BACKEND_NAME}, quant_dequant_pattern_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax_0D) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_0D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_0D.onnx")); auto test_case = test::TestCase(function); test_case.add_input({3.141592}); @@ -3799,7 +3788,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax_0D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax_1D) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax_1D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax_1D.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.0f, 0.0f, 1.0f}); @@ -3810,7 +3799,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax_1D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_1D) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_1D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_1D.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-1.0f, 0.0f, 1.0f}); @@ -3821,7 +3810,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_1D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_2D) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_2D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_2D.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.0f, 1.0f, 2.0f, 3.0f, 10000, 10001, 10002, 10003}); @@ -3840,7 +3829,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_2D) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_2D_reshape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_2D.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/logsoftmax13_2D.onnx")); InferenceEngine::CNNNetwork net(function); InferenceEngine::ICNNNetwork::InputShapes shapes = {}; InferenceEngine::SizeVector shape = {1, 1, 4000}; @@ -3852,7 +3841,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_logsoftmax13_2D_reshape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_hard_sigmoid) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/hard_sigmoid.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/hard_sigmoid.onnx")); const auto inf = std::numeric_limits::infinity(); const auto neg_inf = -std::numeric_limits::infinity(); @@ -3867,7 +3856,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_hard_sigmoid) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f}); @@ -3879,7 +3868,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_axis_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_axis_1.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -3895,7 +3884,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_axes_1_2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_axes_1_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_axes_1_2.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -3910,7 +3899,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_axes_1_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_no_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_no_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v6_broadcast_no_axis.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 2}; @@ -3925,7 +3914,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v6_broadcast_no_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v7) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v7.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v7.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f}); @@ -3937,7 +3926,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v7) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v7_broadcast) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v7_broadcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mul_v7_broadcast.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 2, 3}; @@ -3952,7 +3941,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_mul_v7_broadcast) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_axis_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_axis_1.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -3968,7 +3957,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_axes_1_2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_axes_1_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_axes_1_2.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -3983,7 +3972,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_axes_1_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_no_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_no_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_v6_broadcast_no_axis.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 2}; @@ -3998,7 +3987,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v6_broadcast_no_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v7) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/add_v7.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/add_v7.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f}); @@ -4010,7 +3999,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_v7) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_axis_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_axis_1.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -4026,7 +4015,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_axes_1_2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_axes_1_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_axes_1_2.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -4041,7 +4030,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_axes_1_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_no_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_no_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v6_broadcast_no_axis.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 2}; @@ -4056,7 +4045,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v6_broadcast_no_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v7) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v7.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v7.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f}); @@ -4068,7 +4057,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v7) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v7_broadcast) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v7_broadcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/sub_v7_broadcast.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 2, 3}; @@ -4083,7 +4072,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_sub_v7_broadcast) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_axis_1) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_axis_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_axis_1.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -4100,7 +4089,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_axes_1_2) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_axes_1_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_axes_1_2.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 3, 2, 2}; @@ -4116,7 +4105,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_axes_1_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_no_axis) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_no_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/div_v6_broadcast_no_axis.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 2}; @@ -4131,7 +4120,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v6_broadcast_no_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v7) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/div_v7.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/div_v7.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.0f, 2.0f, 3.0f}); @@ -4143,7 +4132,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v7) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v7_broadcast) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/div_v7_broadcast.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/div_v7_broadcast.onnx")); auto test_case = test::TestCase(function); Shape shape{1, 2, 3}; @@ -4158,7 +4147,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_div_v7_broadcast) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dangling_parameter) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dangling_parameter.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dangling_parameter.onnx")); auto test_case = test::TestCase(function); @@ -4170,7 +4159,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dangling_parameter) NGRAPH_TEST(${BACKEND_NAME}, onnx_clip_inbounds) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/test_clip_inbounds.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/test_clip_inbounds.onnx")); auto test_case = test::TestCase(function); const std::vector data{-1, 0, 1, -9999, 9999}; @@ -4182,7 +4171,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_clip_inbounds) NGRAPH_TEST(${BACKEND_NAME}, onnx_mvn_v6) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/mvn_v6.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/mvn_v6.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -4202,7 +4191,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_mvn_v6) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout1_no_training_no_return_mask) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout1_no_training_no_return_mask.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout1_no_training_no_return_mask.onnx")); auto test_case = test::TestCase(function); const std::vector data(3 * 4 * 5, 2.0f); @@ -4214,7 +4203,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout1_no_training_no_return_mask) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout1_no_training_return_mask) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout1_no_training_return_mask.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout1_no_training_return_mask.onnx")); auto test_case = test::TestCase(function); const std::vector data(3 * 4 * 5, 2.0f); @@ -4228,7 +4217,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout1_no_training_return_mask) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout7_no_return_mask) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout7_no_return_mask.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout7_no_return_mask.onnx")); auto test_case = test::TestCase(function); const std::vector data(3 * 4 * 5, 2.0f); @@ -4240,7 +4229,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout7_no_return_mask) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_no_training_no_return_mask) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_training_no_return_mask.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_training_no_return_mask.onnx")); auto test_case = test::TestCase(function); const std::vector data(3 * 4 * 5, 2.0f); @@ -4252,7 +4241,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_no_training_no_return_mask) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_no_training_return_mask) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_training_return_mask.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_training_return_mask.onnx")); auto test_case = test::TestCase(function); const std::vector data(3 * 4 * 5, 2.0f); @@ -4266,7 +4255,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_no_training_return_mask) NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_no_traning_no_const_rato) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_traning_no_const_rato.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_no_traning_no_const_rato.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4}); @@ -4281,7 +4270,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_training_mode) try { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_training_mode.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dropout12_training_mode.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -4300,7 +4289,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dropout12_not_const_training_mode) try { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dropout12_not_const_training_mode.prototxt")); + SERIALIZED_ZOO, "onnx/dropout12_not_const_training_mode.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -4320,7 +4309,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_multiple_slices_last_layer) std::fill(data.begin(), data.end(), 1); const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/multiple_slices_last_layer.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/multiple_slices_last_layer.onnx")); auto test_case = test::TestCase(function); std::vector o1(1 * 320 * 320 * 21); std::fill(o1.begin(), o1.end(), 1); @@ -4337,7 +4326,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_multiple_slices_last_layer) NGRAPH_TEST(${BACKEND_NAME}, onnx_slice_const_axes_source) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/slice_const_axes_source.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/slice_const_axes_source.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f}); @@ -4348,7 +4337,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_slice_const_axes_source) NGRAPH_TEST(${BACKEND_NAME}, onnx_softmax_crossentropy_loss_mean) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_crossentropy_loss_mean.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_crossentropy_loss_mean.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.54881352186203, @@ -4374,7 +4363,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_softmax_crossentropy_loss_mean) NGRAPH_TEST(${BACKEND_NAME}, onnx_negativelog_likelihood_loss) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/negativelog_likelihood_loss.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/negativelog_likelihood_loss.onnx")); auto test_case = test::TestCase(function); test_case.add_input({ @@ -4395,7 +4384,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_negativelog_likelihood_loss) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_input_as_shape_default_value) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/constant_fill_input_as_shape_default_value.prototxt")); + SERIALIZED_ZOO, "onnx/constant_fill_input_as_shape_default_value.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{1, 2, 3}, {0.f, 0.f, 0.f, 0.f, 0.f, 0.f}); @@ -4405,7 +4394,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_input_as_shape_default_value) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_input_as_shape_u8_type) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_input_as_shape_u8_type.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_input_as_shape_u8_type.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 1, 2}, {3, 3, 3, 3, 3, 3}); @@ -4415,7 +4404,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_input_as_shape_u8_type) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_extra_shape) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_extra_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_extra_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 1, 2, 2, 1}, std::vector(12, 3.0f)); @@ -4425,7 +4414,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_extra_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_shape_attribute) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_shape_attribute.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_fill_shape_attribute.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 3, 4}, std::vector(24, 5)); @@ -4435,7 +4424,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_fill_shape_attribute) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_tensor) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_tensor.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_tensor.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 3}, {0.0f, 0.5f, 1.f, 1.5f, 2.f, 2.5f}); @@ -4445,7 +4434,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_tensor) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_bfloat_tensor) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_bfloat_tensor.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_bfloat_tensor.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 3}, {0.f, 5.f, 10.f, 15.f, 20.f, 25.f}); @@ -4455,7 +4444,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_bfloat_tensor) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_scalar) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_scalar.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_scalar.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{}, {0.5f}); @@ -4465,7 +4454,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_scalar) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_array) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_array.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_float_array.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3}, {0.5f, 1.f, 1.5f}); @@ -4475,7 +4464,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_float_array) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_integer_scalar) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_integer_scalar.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_integer_scalar.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{}, {1}); @@ -4485,7 +4474,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_integer_scalar) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_integer_array) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_integer_array.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_integer_array.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3}, {0, 1, 2}); @@ -4495,7 +4484,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_integer_array) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 2}, {0.f, 5.f, 0.f, 0.f}); @@ -4505,7 +4494,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x2) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1.f, 0.f, 0.f, 8.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 3.f, 0.f}); @@ -4515,7 +4504,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_3x4_linearized_indices) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_3x4_linearized_indices.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_3x4_linearized_indices.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1.f, 0.f, 0.f, 8.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 3.f, 0.f}); @@ -4525,7 +4514,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_3x4_linearized_in NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int32_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int32_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int32_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4535,7 +4524,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int32_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int64_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int64_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int64_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4545,7 +4534,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int64_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_boolean_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_boolean_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_boolean_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0}); @@ -4555,7 +4544,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_boolean_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float16_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float16_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float16_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4565,7 +4554,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float16_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_double_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_double_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_double_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4575,7 +4564,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_double_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int8_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int8_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int8_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4585,7 +4574,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int8_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int16_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int16_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_int16_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4595,7 +4584,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_int16_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint8_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint8_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint8_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4605,7 +4594,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint8_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint16_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint16_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint16_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4615,7 +4604,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint16_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint32_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint32_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint32_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4625,7 +4614,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint32_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint64_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint64_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_uint64_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4635,7 +4624,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_uint64_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_bfloat16_3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_bfloat16_3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_bfloat16_3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{3, 4}, {1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3, 0}); @@ -4645,7 +4634,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_bfloat16_3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_8x17) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_8x17.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_8x17.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{8, 17}, {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, @@ -4662,7 +4651,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_8x17) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_2x3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_2x3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 3, 4}, {1.f, 0.f, 0.f, 8.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 3.f, 0.f, @@ -4673,7 +4662,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x2x3x4) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_2x2x3x4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/constant_sparse_tensor_float_2x2x3x4.onnx")); auto test_case = test::TestCase(function); test_case.add_expected_output(Shape{2, 2, 3, 4}, {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 2.f, 3.f, @@ -4686,7 +4675,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_constant_sparse_tensor_float_2x2x3x4) NGRAPH_TEST(${BACKEND_NAME}, onnx_einsum_sum) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/einsum_sum.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/einsum_sum.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3, 4}, {1.764052345967664, @@ -4709,7 +4698,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_einsum_sum) NGRAPH_TEST(${BACKEND_NAME}, onnx_float16_tensor_as_int32) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_fp16_W_as_int32.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_fp16_W_as_int32.onnx")); auto test_case = test::TestCase(function); // clang-format off diff --git a/ngraph/test/onnx/onnx_import_const_folding.in.cpp b/ngraph/test/onnx/onnx_import_const_folding.in.cpp index 473c98b2834..e0788ca82eb 100644 --- a/ngraph/test/onnx/onnx_import_const_folding.in.cpp +++ b/ngraph/test/onnx/onnx_import_const_folding.in.cpp @@ -56,7 +56,7 @@ namespace NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.onnx")); test_constant_folding(fn, {1.0, 1.1, 3.0, 2.1, 5.0}, Shape{1, 5}); } @@ -64,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements) NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_scalar) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_scalar.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_scalar.onnx")); test_constant_folding(fn, {0}, Shape{1, 1}); } @@ -72,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_scalar) NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d.onnx")); test_constant_folding(fn, {1, 2, 4}, Shape{1, 3}); } @@ -80,7 +80,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d) NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d_float) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d_float.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d_float.onnx")); test_constant_folding(fn, {0, 1, 3, 4, 5, 6, 7, 8, 9}); } @@ -88,7 +88,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d_float) NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_3d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_3d.onnx")); // Vertical slices are 3D indices of non-zero elements in the input tensor // {0, 0, 0, 1, 1, 2, 2} @@ -101,7 +101,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d) NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_2d_bool) { const auto fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_2d_bool.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_2d_bool.onnx")); test_constant_folding(fn, {0, 1, 1, 0}); } diff --git a/ngraph/test/onnx/onnx_import_controlflow.in.cpp b/ngraph/test/onnx/onnx_import_controlflow.in.cpp index ffcf4bacd7d..1be72f83b53 100644 --- a/ngraph/test/onnx/onnx_import_controlflow.in.cpp +++ b/ngraph/test/onnx/onnx_import_controlflow.in.cpp @@ -32,7 +32,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add.onnx")); // Shape inference tests const auto& parameters = function->get_parameters(); @@ -67,7 +67,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond.onnx")); auto test_case = test::TestCase(function); // termination condition @@ -84,7 +84,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.onnx")); auto test_case = test::TestCase(function); // termination condition @@ -102,7 +102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/loop_2d_add_no_identity_termination_cond_static_shapes.prototxt")); + "onnx/loop/loop_2d_add_no_identity_termination_cond_static_shapes.onnx")); auto test_case = test::TestCase(function); // termination condition @@ -119,7 +119,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_false) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_false.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_false.onnx")); auto test_case = test::TestCase(function); // a_init @@ -138,7 +138,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond.onnx")); auto test_case = test::TestCase(function); // a_init @@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/loop_2d_add_const_no_identity_termination_cond_static_shapes.prototxt")); + "onnx/loop/loop_2d_add_const_no_identity_termination_cond_static_shapes.onnx")); auto test_case = test::TestCase(function); // a_init @@ -173,7 +173,7 @@ NGRAPH_TEST(${BACKEND_NAME}, NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.onnx")); auto test_case = test::TestCase(function); // trip count @@ -196,7 +196,7 @@ NGRAPH_TEST(${BACKEND_NAME}, { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.prototxt")); + "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.onnx")); auto test_case = test::TestCase(function); // trip count @@ -217,7 +217,7 @@ NGRAPH_TEST(${BACKEND_NAME}, NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_scope) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_initializer_from_parent_scope.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_initializer_from_parent_scope.onnx")); auto test_case = test::TestCase(function); @@ -232,7 +232,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_s NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_node_from_parent_scope.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_node_from_parent_scope.onnx")); auto test_case = test::TestCase(function); // a_init @@ -248,7 +248,7 @@ NGRAPH_TEST(${BACKEND_NAME}, { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt")); + "onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.onnx")); auto test_case = test::TestCase(function); // a_init @@ -267,7 +267,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scop try { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_incorrect_access_body_scope.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_incorrect_access_body_scope.onnx")); FAIL() << "Incorrect access to body scope not detected"; } catch (const ngraph_error& e) @@ -285,7 +285,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scop NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_parent_and_subgraph) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_the_same_name.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_the_same_name.onnx")); auto test_case = test::TestCase(function); // a_init @@ -299,7 +299,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.onnx")); auto test_case = test::TestCase(function); // a_init @@ -315,7 +315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_mul_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_mul_opset1.onnx")); const auto parent_ops = function->get_ops(); const auto loop_node_it = @@ -337,7 +337,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_scalars_add.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_scalars_add.onnx")); auto test_case = test::TestCase(function); // a_init @@ -351,7 +351,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_cond.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_cond.onnx")); auto test_case = test::TestCase(function); // a_init @@ -365,7 +365,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_dynamic) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_dynamic.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_dynamic.onnx")); auto test_case = test::TestCase(function); // trip count @@ -384,7 +384,7 @@ NGRAPH_TEST(${BACKEND_NAME}, { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/onnx_controlflow_loop_2d_infer_types.prototxt")); + "onnx/loop/onnx_controlflow_loop_2d_infer_types.onnx")); auto test_case = test::TestCase(function); // trip count @@ -406,7 +406,7 @@ NGRAPH_TEST(${BACKEND_NAME}, { const auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/loop/loop_add_node_from_parent_scope_infer_types.prototxt")); + "onnx/loop/loop_add_node_from_parent_scope_infer_types.onnx")); auto test_case = test::TestCase(function); // a_init @@ -426,7 +426,7 @@ NGRAPH_TEST(${BACKEND_NAME}, NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_concat_values.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_concat_values.onnx")); auto test_case = test::TestCase(function); // trip_count @@ -451,7 +451,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skipped_shape_inference) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_and_cond_skipped.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_and_cond_skipped.onnx")); const auto& results = function->get_results(); EXPECT_EQ(results.size(), 2); @@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skippe NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_infinite.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_infinite.onnx")); auto test_case = test::TestCase(function); // trip_count @@ -490,7 +490,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite) NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_outputs) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/loop/loop_no_variadic_inputs_and_outputs.prototxt")); + SERIALIZED_ZOO, "onnx/loop/loop_no_variadic_inputs_and_outputs.onnx")); auto test_case = test::TestCase(function); // trip_count @@ -506,7 +506,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_output NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_power) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_pow.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_pow.onnx")); auto test_case = test::TestCase(function); // trip_count diff --git a/ngraph/test/onnx/onnx_import_convpool.in.cpp b/ngraph/test/onnx/onnx_import_convpool.in.cpp index 9c0057d4b50..a9e2f625665 100644 --- a/ngraph/test/onnx/onnx_import_convpool.in.cpp +++ b/ngraph/test/onnx/onnx_import_convpool.in.cpp @@ -37,7 +37,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_padding) { // Convolution with strides=2 and padding=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_padding.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_padding.onnx")); Inputs inputs; // data (1, 1, 7, 5) input tensor @@ -72,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_no_padding) { // Convolution with strides=2 and padding=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_no_padding.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_no_padding.onnx")); Inputs inputs; // data (1, 1, 7, 5) input tensor @@ -104,7 +104,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding) { // Convolution with strides=2 and padding=1 auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/conv_with_strides_and_asymmetric_padding.prototxt")); + SERIALIZED_ZOO, "onnx/conv_with_strides_and_asymmetric_padding.onnx")); Inputs inputs; // data (1, 1, 7, 5) input tensor @@ -136,7 +136,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_strides) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv2d_dilation_assym_pads_strides.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv2d_dilation_assym_pads_strides.onnx")); // "", // auto_pad // vector{1, 1}, // dilations @@ -178,7 +178,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_strides) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv3d_bias.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv3d_bias.onnx")); // "", // auto_pad // vector{2, 2, 2}, // dilations @@ -294,7 +294,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_transpose_w_groups) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_transpose_w_groups.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_transpose_w_groups.onnx")); Inputs inputs; inputs.emplace_back(std::vector{ @@ -316,7 +316,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d) { // Pooling with strides=2 and no padding auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs; @@ -339,7 +339,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d_pads) { // Pooling with strides=2 and padding=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d_pads.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d_pads.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs; @@ -364,7 +364,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads) { // Pooling with strides=2 and padding=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/max_pool_2d_pads.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/max_pool_2d_pads.onnx")); // input data shape (1, 1, 4, 4) Inputs inputs; @@ -388,7 +388,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p0.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p0.onnx")); std::vector input{1, 0, -4, 0, 2, 1, -6, 1, 0, 0, 0, 0, -7, 1, -1, 0, -1, 8, 0, 10, 9, 0, 0, 5}; @@ -404,7 +404,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p1.onnx")); Inputs inputs{std::vector(2 * 3 * 4)}; std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f); @@ -420,7 +420,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p2.onnx")); Inputs inputs{std::vector(2 * 3 * 4)}; std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f); @@ -436,7 +436,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p3.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p3.onnx")); Inputs inputs{std::vector(2 * 3 * 4)}; std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f); @@ -452,7 +452,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_output_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_output_shape.onnx")); auto test_case = test::TestCase(function); @@ -467,7 +467,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_upper) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_upper.prototxt")); + SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_upper.onnx")); auto test_case = test::TestCase(function); @@ -495,7 +495,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_sam NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_lower) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_lower.prototxt")); + SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_lower.onnx")); auto test_case = test::TestCase(function); @@ -523,7 +523,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_sam NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_w_pads.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_w_pads.onnx")); auto test_case = test::TestCase(function); @@ -576,7 +576,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_pads_bias) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_pads_bias.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_pads_bias.onnx")); auto test_case = test::TestCase(function); diff --git a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp index 1c679e6813b..cdbab9db4a2 100644 --- a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp +++ b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp @@ -38,7 +38,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynamic // the model represents a linear function A * x + B // where all 3 operands are model inputs (no initializers) const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.onnx")); const auto& graph_inputs = function->get_parameters(); EXPECT_EQ(graph_inputs.size(), 3); @@ -73,7 +73,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynamic NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_ab_plus_c_inference) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.onnx")); auto test_case = test::TestCase(function); @@ -115,7 +115,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_scalar_initializers_shape_check) // initializers defined witout the "dims" field should produce Constants with an empty Shape // initializers with "dims: 0" should be have the same way (Shape{} not Shape{0}) const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/scalar_initializers.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/scalar_initializers.onnx")); for (auto ng_node : function->get_ordered_ops()) { @@ -130,7 +130,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_check) { // the model contains a single Add operation that takes a fully dynamic input and a scalar const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx")); const auto& graph_inputs = function->get_parameters(); ASSERT_EQ(graph_inputs.size(), 2); @@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference) { // the model contains a single Add operation that takes a fully dynamic input and a scalar const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx")); auto test_case = test::TestCase(function); @@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {1.0f, 2.5f, 4.3f}); @@ -195,7 +195,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3, 2}, {1.0f, 2.5f, 4.3f, 1.0f, 2.5f, 4.3f}); @@ -208,7 +208,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {-1.5f, 0.0f, 1.5f}); @@ -220,7 +220,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3, 2}, {-1.5f, 0.0f, 1.5f, -1.5f, 0.0f, 1.5f}); @@ -233,7 +233,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 3}, {-0.9f, 0.0f, 0.9f}); @@ -245,7 +245,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{3, 2}, {-0.9f, 0.0f, 0.9f, -0.9f, 0.0f, 0.9f}); @@ -258,7 +258,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_batch.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_batch.onnx")); auto test_case = test::TestCase(function); @@ -281,7 +281,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_bias.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_bias.onnx")); auto test_case = test::TestCase(function); @@ -304,7 +304,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/average_pool_2d_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/average_pool_2d_dyn.onnx")); auto test_case = test::TestCase(function); @@ -324,7 +324,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_2d_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_2d_dyn.onnx")); auto test_case = test::TestCase(function); @@ -344,7 +344,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_with_indices_output.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_with_indices_output.onnx")); auto test_case = test::TestCase(function); @@ -369,7 +369,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/global_average_pool_dyn.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/global_average_pool_dyn.onnx")); auto test_case = test::TestCase(function); @@ -389,7 +389,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/global_max_pool_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/global_max_pool_dyn.onnx")); auto test_case = test::TestCase(function); @@ -409,7 +409,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/argmax_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/argmax_dyn.onnx")); auto test_case = test::TestCase(function); @@ -429,7 +429,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/argmin_no_keep_dims_dyn.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/argmin_no_keep_dims_dyn.onnx")); auto test_case = test::TestCase(function); @@ -449,7 +449,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_float_zeros.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_float_zeros.onnx")); std::vector expected_values(24, 0); @@ -464,7 +464,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_int_ones.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_int_ones.onnx")); std::vector expected_values(6, 1); @@ -479,7 +479,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -497,7 +497,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -514,7 +514,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -530,7 +530,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -546,7 +546,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -563,7 +563,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx")); auto test_case = test::TestCase(function); @@ -581,7 +581,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_uint16_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_uint16_dyn.onnx")); auto test_case = test::TestCase(function); @@ -597,7 +597,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tile.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tile.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5}); // input @@ -609,7 +609,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/tile_static.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/tile_static.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5}); // input @@ -621,7 +621,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data) { auto ct_fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_data.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_data.onnx")); auto test_case = test::TestCase(ct_fn); @@ -680,7 +680,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters) { auto ct_fn = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_filters.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_filters.onnx")); auto test_case = test::TestCase(ct_fn); @@ -738,7 +738,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_transpose) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/transpose.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/transpose.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 2, 4, 3}; @@ -775,7 +775,7 @@ namespace NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis0.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis0.onnx")); auto test_case = test::TestCase(function); const size_t RANKS_TO_TEST = 4; @@ -802,7 +802,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis.onnx")); auto test_case = test::TestCase(function); const size_t RANKS_TO_TEST = 4; @@ -829,7 +829,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_neg_axis.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_neg_axis.onnx")); auto test_case = test::TestCase(function); const size_t RANKS_TO_TEST = 4; @@ -856,7 +856,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/flatten.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/flatten.onnx")); std::vector data{1, 2, 3, 4, 5, 6, 7, 8}; auto test_case = test::TestCase(function); @@ -869,7 +869,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_dynamic_hw.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_dynamic_hw.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{1, 2, 3, 4}, {1, 0, -4, 0, 2, 1, -6, 1, 0, 0, 0, 0, @@ -882,7 +882,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8}); @@ -896,7 +896,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4, 5, 6, 7, 8}); @@ -909,7 +909,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_dyn_begin_end) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_default_steps_dyn_begin_end.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_default_steps_dyn_begin_end.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4}); @@ -922,7 +922,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_dyn NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8}); @@ -935,7 +935,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input.onnx")); auto test_case = test::TestCase(function); @@ -953,7 +953,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_neg_axes.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_neg_axes.onnx")); auto test_case = test::TestCase(function); @@ -971,7 +971,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_12_axes.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_12_axes.onnx")); auto test_case = test::TestCase(function); @@ -988,7 +988,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_20_axes.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_20_axes.onnx")); auto test_case = test::TestCase(function); @@ -1006,7 +1006,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes.onnx")); auto test_case = test::TestCase(function); @@ -1023,7 +1023,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_max) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_0231_axes_ends_max.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_0231_axes_ends_max.onnx")); auto test_case = test::TestCase(function); @@ -1043,7 +1043,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_ma NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_max) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_2103_axes.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_2103_axes.onnx")); auto test_case = test::TestCase(function); @@ -1064,7 +1064,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_ma NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes_21_steps.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes_21_steps.onnx")); auto test_case = test::TestCase(function); @@ -1082,7 +1082,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_axes.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_axes.onnx")); auto test_case = test::TestCase(function); @@ -1098,7 +1098,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_10_the_same_output_same) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_the_same_out_shape.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_the_same_out_shape.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}); @@ -1110,7 +1110,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_10_the_same_output_same) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/hardmax.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/hardmax.onnx")); auto test_case = test::TestCase(function); test_case.add_input( @@ -1146,7 +1146,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_2.onnx")); const std::vector input = { 2.75793882, -0.50841322, 0.82013929, -0.62409912, -0.96136118, 0.21004745, 1.38337255, @@ -1184,7 +1184,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_positive_step) { const auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.onnx")); auto test_case = test::TestCase(function); @@ -1199,7 +1199,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_positive_step) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_negative_step) { const auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.onnx")); auto test_case = test::TestCase(function); @@ -1214,7 +1214,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_negative_step) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape.onnx")); Shape data_shape{1, 2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -1236,7 +1236,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape2.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape2.onnx")); Shape data_shape{1, 2, 3, 4}; std::vector data(shape_size(data_shape)); @@ -1258,7 +1258,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) // NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_input_nearest_infer) // { // const auto function = onnx_import::import_onnx_model( -// file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_input_nearest.prototxt")); +// file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_input_nearest.onnx")); // // // Input data shape (1, 1, 2, 2) // // mode: nearest @@ -1276,7 +1276,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input_opset1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input_opset1.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8}); @@ -1287,7 +1287,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_clamp_neg_ends_opset1.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_clamp_neg_ends_opset1.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8}); @@ -1298,7 +1298,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends) NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_3d_input_21_axes_ends_max) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_21_axes_ends_max_opset1.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_21_axes_ends_max_opset1.onnx")); auto test_case = test::TestCase(function); @@ -1315,7 +1315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat // the ReduceMax node has a fully dynamic input and the reduction axis is -1 auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/dynamic_shapes/reduce_max_dynamic_input_rank_negative_axis.prototxt")); + "onnx/dynamic_shapes/reduce_max_dynamic_input_rank_negative_axis.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}); @@ -1326,7 +1326,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat NGRAPH_TEST(${BACKEND_NAME}, onnx_size_dyn_op) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/size_op_dyn.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/size_op_dyn.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{2, 3}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}); @@ -1337,7 +1337,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_size_dyn_op) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.onnx")); auto test_case = test::TestCase(function); @@ -1352,7 +1352,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/depth_to_space.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/depth_to_space.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); @@ -1370,7 +1370,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_dynamic_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/space_to_depth.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/space_to_depth.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); diff --git a/ngraph/test/onnx/onnx_import_exceptions.cpp b/ngraph/test/onnx/onnx_import_exceptions.cpp index 80f530362c0..295f9f75fa7 100644 --- a/ngraph/test/onnx/onnx_import_exceptions.cpp +++ b/ngraph/test/onnx/onnx_import_exceptions.cpp @@ -16,7 +16,7 @@ using namespace ngraph; TEST(onnx_importer, exception_throws_ngraph_error) { EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt")), + SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx")), ngraph_error); } @@ -25,7 +25,7 @@ TEST(onnx_importer, exception_msg_ngraph_error) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx")); // Should have thrown, so fail if it didn't FAIL() << "ONNX Importer did not detected incorrect model!"; } @@ -46,7 +46,7 @@ TEST(onnx_importer, exception_msg_onnx_node_validation_failure) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_bad_scale_type.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_bad_scale_type.onnx")); // Should have thrown, so fail if it didn't FAIL() << "ONNX Importer did not detected incorrect model!"; } @@ -75,7 +75,7 @@ TEST(onnx_importer, exception_msg_std_err_wrapped) try { onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/eye_link_dyn_shape.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/eye_link_dyn_shape.onnx")); // Should have thrown, so fail if it didn't FAIL() << "ONNX Importer did not detected incorrect model!"; } diff --git a/ngraph/test/onnx/onnx_import_external_data.in.cpp b/ngraph/test/onnx/onnx_import_external_data.in.cpp index 10638eaa200..583451e9ca1 100644 --- a/ngraph/test/onnx/onnx_import_external_data.in.cpp +++ b/ngraph/test/onnx/onnx_import_external_data.in.cpp @@ -24,7 +24,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); @@ -36,7 +36,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data) NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_from_stream) { std::string path = - file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.prototxt"); + file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.onnx"); std::ifstream stream{path, std::ios::in | std::ios::binary}; ASSERT_TRUE(stream.is_open()); const auto function = onnx_import::import_onnx_model(stream, path); @@ -50,10 +50,10 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_from_stream) stream.close(); } -NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optinal_fields) +NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optional_fields) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/external_data/external_data_optional_fields.prototxt")); + SERIALIZED_ZOO, "onnx/external_data/external_data_optional_fields.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); @@ -65,7 +65,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optinal_fields) NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_in_different_paths) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/external_data/external_data_different_paths.prototxt")); + SERIALIZED_ZOO, "onnx/external_data/external_data_different_paths.onnx")); auto test_case = test::TestCase(function); // first input: {3.f}, second: {1.f, 2.f, 5.f} read from external files @@ -79,7 +79,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_two_tensors_data_in_the_same_file) { auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/external_data/external_data_two_tensors_data_in_the_same_file.prototxt")); + "onnx/external_data/external_data_two_tensors_data_in_the_same_file.onnx")); auto test_case = test::TestCase(function); // first input: {3, 2, 1}, second: {1, 2, 3} read from external file @@ -94,7 +94,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_external_data_exception) try { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/external_data/external_data_file_not_found.prototxt")); + SERIALIZED_ZOO, "onnx/external_data/external_data_file_not_found.onnx")); FAIL() << "Incorrect path to external data not detected"; } catch (const ngraph_error& error) @@ -116,7 +116,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_up_dir_path) { auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/external_data/inner_scope/external_data_file_in_up_dir.prototxt")); + "onnx/external_data/inner_scope/external_data_file_in_up_dir.onnx")); FAIL() << "Incorrect path to external data not detected"; } catch (const ngraph_error& error) @@ -135,7 +135,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_up_dir_path) NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_sanitize_path) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/external_data/external_data_sanitize_test.prototxt")); + SERIALIZED_ZOO, "onnx/external_data/external_data_sanitize_test.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1.f, 2.f, 3.f, 4.f}); diff --git a/ngraph/test/onnx/onnx_import_org_openvino.in.cpp b/ngraph/test/onnx/onnx_import_org_openvino.in.cpp index 3407ad8e956..46fec97913e 100644 --- a/ngraph/test/onnx/onnx_import_org_openvino.in.cpp +++ b/ngraph/test/onnx/onnx_import_org_openvino.in.cpp @@ -53,7 +53,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_prior_box) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/prior_box.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/prior_box.onnx")); auto test_case = test::TestCase(function); std::vector A(3 * 2 * 2); std::vector B(3 * 6 * 6); @@ -78,7 +78,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_prior_box) NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/priorbox_clustered.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/priorbox_clustered.onnx")); auto test_case = test::TestCase(function); std::vector A{15.0}; @@ -96,7 +96,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered) NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_most_attrs_default) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/priorbox_clustered_most_attrs_default.prototxt")); + SERIALIZED_ZOO, "onnx/priorbox_clustered_most_attrs_default.onnx")); auto test_case = test::TestCase(function); std::vector A(1 * 1 * 2 * 1); @@ -130,7 +130,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_first_input_bad_shape) try { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/priorbox_clustered_first_input_bad_shape.prototxt")); + SERIALIZED_ZOO, "onnx/priorbox_clustered_first_input_bad_shape.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -150,7 +150,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape) try { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/priorbox_clustered_second_input_bad_shape.prototxt")); + SERIALIZED_ZOO, "onnx/priorbox_clustered_second_input_bad_shape.onnx")); FAIL() << "Expected exception was not thrown"; } catch (const ngraph::ngraph_error& e) @@ -168,7 +168,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_detection_output) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/detection_output.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/detection_output.onnx")); auto test_case = test::TestCase(function); auto gen_vector = [](size_t size, float min, float max) -> std::vector { @@ -199,7 +199,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_detection_output) NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 8, 2, 2}; int size = shape_size(shape); @@ -224,7 +224,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm) NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm_5d) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm_5d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm_5d.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 8, 1, 2, 1}; int size = shape_size(shape); @@ -247,7 +247,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm_5d) NGRAPH_TEST(${BACKEND_NAME}, onnx_normalize) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/normalize.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/normalize.onnx")); auto test_case = test::TestCase(function); std::vector data(12); std::iota(data.begin(), data.end(), 1); @@ -273,7 +273,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_normalize) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/swish_with_beta.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/swish_with_beta.onnx")); const Shape expected_output_shape{3}; auto test_case = test::TestCase(function); @@ -287,7 +287,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_without_beta) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/swish_without_beta.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/swish_without_beta.onnx")); const Shape expected_output_shape{3}; auto test_case = test::TestCase(function); @@ -302,7 +302,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output) { auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/org.openvinotoolkit/experimental_detectron/detection_output.prototxt")); + "onnx/org.openvinotoolkit/experimental_detectron/detection_output.onnx")); auto test_case = test::TestCase(function); // rois @@ -366,7 +366,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output_ auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/" - "detection_output_most_attrs_default.prototxt")); + "detection_output_most_attrs_default.onnx")); auto test_case = test::TestCase(function); // rois @@ -413,7 +413,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_proposal auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/" - "generate_proposals_single_image.prototxt")); + "generate_proposals_single_image.onnx")); auto test_case = test::TestCase(function); // im_info @@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_proposal NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_group_norm) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/group_norm.prototxt")); + SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/group_norm.onnx")); auto test_case = test::TestCase(function); Shape shape{2, 8, 2, 2}; @@ -495,7 +495,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_prior_grid_genera { auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/org.openvinotoolkit/experimental_detectron/prior_grid_generator.prototxt")); + "onnx/org.openvinotoolkit/experimental_detectron/prior_grid_generator.onnx")); auto test_case = test::TestCase(function); @@ -522,7 +522,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_extra { auto function = onnx_import::import_onnx_model(file_util::path_join( SERIALIZED_ZOO, - "onnx/org.openvinotoolkit/experimental_detectron/roi_feature_extractor.prototxt")); + "onnx/org.openvinotoolkit/experimental_detectron/roi_feature_extractor.onnx")); auto test_case = test::TestCase(function); @@ -580,7 +580,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_extra NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/topk_rios.prototxt")); + SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/topk_rios.onnx")); auto test_case = test::TestCase(function); @@ -594,7 +594,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_deformable_conv_2d) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/org.openvinotoolkit/deformable_conv_2d.prototxt")); + SERIALIZED_ZOO, "onnx/org.openvinotoolkit/deformable_conv_2d.onnx")); auto test_case = test::TestCase(function); diff --git a/ngraph/test/onnx/onnx_import_provenance.in.cpp b/ngraph/test/onnx/onnx_import_provenance.in.cpp index 4934a4343e3..5e9d85ab40c 100644 --- a/ngraph/test/onnx/onnx_import_provenance.in.cpp +++ b/ngraph/test/onnx/onnx_import_provenance.in.cpp @@ -20,7 +20,7 @@ static std::string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tag_text) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_tag_add.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_tag_add.onnx")); const auto ng_nodes = function->get_ordered_ops(); for (auto ng_node : ng_nodes) @@ -60,7 +60,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_only_output) // the Add node in the model does not have a name, // only its output name should be found in the provenance tags const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_only_outputs.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_only_outputs.onnx")); test_provenance_tags(function, " output_of_add)>"); } @@ -69,7 +69,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_node_name_and_outputs) test::ProvenanceEnabler provenance_enabler; const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_node_name_and_outputs.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_node_name_and_outputs.onnx")); test_provenance_tags(function, " output_of_add)>"); } @@ -78,7 +78,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_multiple_outputs_op) test::ProvenanceEnabler provenance_enabler; const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_multiple_outputs_op.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_multiple_outputs_op.onnx")); test_provenance_tags(function, " values, indices)>"); } @@ -87,7 +87,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tagging_constants) test::ProvenanceEnabler provenance_enabler; const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.onnx")); test_provenance_tags(function, ""); } @@ -97,6 +97,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tagging_parameters) test::ProvenanceEnabler provenance_enabler; const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.onnx")); test_provenance_tags(function, ""); } diff --git a/ngraph/test/onnx/onnx_import_quant.in.cpp b/ngraph/test/onnx/onnx_import_quant.in.cpp index 5881541564e..d44f9fde38b 100644 --- a/ngraph/test/onnx/onnx_import_quant.in.cpp +++ b/ngraph/test/onnx/onnx_import_quant.in.cpp @@ -36,7 +36,7 @@ using Outputs = std::vector>; NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero_p) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{32.25f, 48.34f, 50.f, 83.f}); @@ -48,7 +48,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero_p NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{32.25f, 48.34f, 50.f, 83.f}); @@ -61,7 +61,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_zero_point.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_zero_point.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{0.f, 2.f, 3.f, 1000.f, -254.f, -1000.f}); // x @@ -76,7 +76,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_zero.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_zero.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{ @@ -95,7 +95,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_negative.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_negative.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{ @@ -114,7 +114,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequant_lin.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequant_lin.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{19, 210, 21, 10}); @@ -126,7 +126,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zero_point) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale_and_zero_point.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale_and_zero_point.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{19, 210, 21, 10}); // x @@ -140,7 +140,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zero_ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{19, 210, 21, 10}); // x @@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_inputs.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_inputs.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{19}); // x @@ -168,7 +168,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_zero_point.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_zero_point.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{19, 210, 21, 10}); // x @@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_uint8) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_0.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_0.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{0, 3, 128, 255}); // x @@ -197,7 +197,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_uint NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_int8) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_1.onnx")); auto test_case = test::TestCase(function); @@ -212,7 +212,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_int8 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_2.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_2.onnx")); auto test_case = ngraph::test::TestCase(function); @@ -230,7 +230,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_3.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_3.onnx")); auto test_case = ngraph::test::TestCase(function); @@ -248,7 +248,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_4.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_4.onnx")); auto test_case = ngraph::test::TestCase(function); @@ -272,7 +272,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_negative_axis) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_5.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_5.onnx")); auto test_case = ngraph::test::TestCase(function); @@ -290,7 +290,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_ne NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/quant_conv_lin.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/quant_conv_lin.onnx")); std::vector> inputs; inputs.emplace_back(std::vector{ @@ -313,7 +313,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_2d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_2d.onnx")); auto test_case = test::TestCase(function); @@ -334,7 +334,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_3d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_3d.onnx")); auto test_case = test::TestCase(function); @@ -355,7 +355,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.onnx")); auto test_case = test::TestCase(function); @@ -380,7 +380,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{2, 3, 4, 5, 6, 7, 8, 9, 10}); // x @@ -394,7 +394,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_zero_point_zero) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); // x @@ -408,7 +408,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_zero_point_zero) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_no_zero_point.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_no_zero_point.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); // x @@ -421,7 +421,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_pads) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_pads.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_pads.onnx")); auto test_case = test::TestCase(function); test_case.add_input(std::vector{2, 3, 4, 5, 6, 7, 8, 9, 10}); // x @@ -437,7 +437,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_pads) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.prototxt")); + SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.onnx")); const Shape expected_output_shape{1, 2, 3, 4}; EXPECT_EQ(function->get_output_size(), 1); @@ -449,7 +449,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.prototxt")); + SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.onnx")); const Shape data_shape{1, 2, 3, 4}; const auto n_elements = shape_size(data_shape); @@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_nonconst_inputs_infer) { const auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/quantization/fake_quantize_nonconst_inputs.prototxt")); + SERIALIZED_ZOO, "onnx/quantization/fake_quantize_nonconst_inputs.onnx")); const Shape data_shape{1, 2, 3, 4}; const size_t n_elements = shape_size(data_shape); diff --git a/ngraph/test/onnx/onnx_import_reshape.in.cpp b/ngraph/test/onnx/onnx_import_reshape.in.cpp index 1dad7b986d3..87072f3572c 100644 --- a/ngraph/test/onnx/onnx_import_reshape.in.cpp +++ b/ngraph/test/onnx/onnx_import_reshape.in.cpp @@ -35,7 +35,7 @@ using Outputs = std::vector>; NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reduced_dims.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reduced_dims.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -57,7 +57,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reordered_dims.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reordered_dims.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -80,7 +80,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_extended_dims.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_extended_dims.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -102,7 +102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_single_dim) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_single_dim.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_single_dim.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -124,7 +124,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim) { // the model contains the target shape in the initializers: [2, -1, 2] const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_dim.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_dim.onnx")); // 2x3x4 auto input = test::NDArray({{{0.5488135, 0.71518934, 0.60276335, 0.5448832}, @@ -161,7 +161,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_with_zero_dims.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_with_zero_dims.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_output_shape_as_input.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_output_shape_as_input.onnx")); // input data shape (2, 3, 4) auto input = test::NDArray({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}, @@ -205,7 +205,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); @@ -223,7 +223,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_v1.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_v1.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); @@ -241,7 +241,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_crd) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_crd.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_crd.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); @@ -262,7 +262,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_blocksize) // This model fails to import since the depth channel length must be a multiple of the // `blocksize` attribute value. EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt")), + SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx")), std::runtime_error); } @@ -270,7 +270,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_no_blocksize) { // This model fails to import since it lacks of required parameter `blocksize`. EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/depth_to_space_no_blocksize.prototxt")), + SERIALIZED_ZOO, "onnx/depth_to_space_no_blocksize.onnx")), std::runtime_error); } @@ -279,7 +279,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_mode) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_mode.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_mode.onnx")); FAIL() << "The onnx_importer did not throw for unknown mode to DepthToSpace op"; } catch (const ngraph::ngraph_error& e) @@ -298,7 +298,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape) try { onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_input_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_input_shape.onnx")); FAIL() << "The onnx_importer did not throw for invalid input shape to DepthToSpace op"; } catch (const ngraph::ngraph_error& e) @@ -315,7 +315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/space_to_depth.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/space_to_depth.onnx")); std::vector input(32); std::iota(input.begin(), input.end(), 0); @@ -336,7 +336,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_invalid_input_shape) try { onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/space_to_depth_invalid_input_shape.prototxt")); + SERIALIZED_ZOO, "onnx/space_to_depth_invalid_input_shape.onnx")); FAIL() << "Expected ngraph_error exception, but no exception was thrown"; } catch (const ngraph::ngraph_error& e) @@ -357,7 +357,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_bad_blocksize) // This model fails to import since the depth channel length must be a multiple of the // `blocksize` attribute value. EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/space_to_depth_bad_blocksize.prototxt")), + SERIALIZED_ZOO, "onnx/space_to_depth_bad_blocksize.onnx")), std::runtime_error); } @@ -365,14 +365,14 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_no_blocksize) { // This model fails to import since it lacks of required `blocksize` attribute. EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/space_to_depth_no_blocksize.prototxt")), + SERIALIZED_ZOO, "onnx/space_to_depth_no_blocksize.onnx")), std::runtime_error); } NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze.onnx")); // {1, 4, 1, 1, 2} auto input = test::NDArray( @@ -393,7 +393,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes) { const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze_opset13_no_axes.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze_opset13_no_axes.onnx")); auto test_case = test::TestCase(function); const std::vector data = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}; @@ -405,7 +405,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze.onnx")); auto input = test::NDArray( {{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, @@ -429,7 +429,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze_negative_axes.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze_negative_axes.onnx")); auto input = test::NDArray( {{{{-1.8427763f, -1.0467733f, 0.50550157f, 1.4897262f, 0.33057404f}}, @@ -453,7 +453,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/concat.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/concat.onnx")); Inputs inputs; @@ -471,7 +471,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/concat_negative_axis.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/concat_negative_axis.onnx")); Inputs inputs; @@ -489,7 +489,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_default) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.onnx")); Inputs inputs{{1, 2, 3, 4, 5, 6}}; Outputs expected_outputs{{1, 2}, {3, 4}, {5, 6}}; @@ -508,7 +508,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_2d) { // Split into 2 equal parts along axis=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_2d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_2d.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); @@ -521,7 +521,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d) { // Split into variable parts {2, 4} along axis=1 auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/split_variable_parts_2d.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/split_variable_parts_2d.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}); @@ -533,7 +533,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_expand_static_shape) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/expand_static_shape.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/expand_static_shape.onnx")); auto test_case = test::TestCase(function); // input data shape (3,1) diff --git a/ngraph/test/onnx/onnx_import_rnn.in.cpp b/ngraph/test/onnx/onnx_import_rnn.in.cpp index a985cc95fc3..6416283dba8 100644 --- a/ngraph/test/onnx/onnx_import_rnn.in.cpp +++ b/ngraph/test/onnx/onnx_import_rnn.in.cpp @@ -34,7 +34,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_default_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_default_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -50,7 +50,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -66,7 +66,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -91,7 +91,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_clip_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_clip_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -107,7 +107,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -138,7 +138,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_mixed_seq_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_mixed_seq_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X @@ -169,7 +169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_mixed_seq_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_mixed_seq_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input({0.68172926, @@ -223,7 +223,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_with_clip_peepholes.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_with_clip_peepholes.onnx")); auto test_case = test::TestCase(function); test_case.add_input({-0.455351, -0.276391, -0.185934, -0.269585}); // X @@ -291,7 +291,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq.onnx")); auto test_case = test::TestCase(function); int hidden_size{3}; @@ -330,7 +330,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_hardsigmoid_activation.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_hardsigmoid_activation.onnx")); auto test_case = test::TestCase(function); @@ -386,7 +386,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_large_batch_no_clip.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_large_batch_no_clip.onnx")); auto test_case = test::TestCase(function); @@ -431,7 +431,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bdir_short_input_seq.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bdir_short_input_seq.onnx")); auto test_case = test::TestCase(function); @@ -491,7 +491,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_mixed_seq_reverse.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_mixed_seq_reverse.onnx")); auto test_case = test::TestCase(function); @@ -536,7 +536,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse) NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_inputs) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq.onnx")); auto batch_size = Dimension::dynamic(); auto seq_length = Dimension::dynamic(); @@ -557,7 +557,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_i NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inputs) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.onnx")); auto batch_size = Dimension::dynamic(); auto seq_length = Dimension::dynamic(); @@ -578,7 +578,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inp NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_dynamic_batch_size_and_seq_len) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_dynamic_batch_size_and_seq_len.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_dynamic_batch_size_and_seq_len.onnx")); auto test_case = test::TestCase(function); test_case.add_input({1, 2, 3, 4, 5, 6}); @@ -707,7 +707,7 @@ protected: NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -752,7 +752,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd.onnx")); auto test_case = test::TestCase(function); @@ -801,7 +801,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_con { // activations: relu, sigmoid auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_sigmoid_const.prototxt")); + SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_sigmoid_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -843,7 +843,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_rel { // activations: relu, hardsigmoid auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_hardsigmoid.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_hardsigmoid.onnx")); auto test_case = test::TestCase(function); @@ -891,7 +891,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_rel NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len.onnx")); auto test_case = test::TestCase(function); @@ -942,7 +942,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); @@ -985,7 +985,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len_c NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); @@ -1027,7 +1027,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq_l NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidir_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidir_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); @@ -1072,7 +1072,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_len NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip.onnx")); auto test_case = test::TestCase(function); @@ -1120,7 +1120,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1165,7 +1165,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1210,7 +1210,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse.onnx")); auto test_case = test::TestCase(function); @@ -1258,7 +1258,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1303,7 +1303,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h_ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h.onnx")); auto test_case = test::TestCase(function); @@ -1353,7 +1353,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1399,7 +1399,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_const NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional.onnx")); auto test_case = test::TestCase(function); @@ -1448,7 +1448,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional) NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1493,7 +1493,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_r NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset.onnx")); auto test_case = test::TestCase(function); @@ -1542,7 +1542,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_r NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const_dynamic) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{4, 3, 2}, in_X); @@ -1587,7 +1587,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const_ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_import_only_gru_defaults_fwd_const_dynamic) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx")); auto batch_size = Dimension::dynamic(); auto seq_length = Dimension::dynamic(); @@ -1694,7 +1694,7 @@ protected: NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1739,7 +1739,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.onnx")); auto test_case = test::TestCase(function); @@ -1787,7 +1787,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations_const.onnx")); auto test_case = test::TestCase(function); @@ -1833,7 +1833,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_con NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations.onnx")); auto test_case = test::TestCase(function); @@ -1881,7 +1881,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -1926,7 +1926,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len_c NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len.onnx")); auto test_case = test::TestCase(function); @@ -1977,7 +1977,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -2018,7 +2018,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq_l NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_len_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidir_mixed_seq_len_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidir_mixed_seq_len_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -2065,7 +2065,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_len NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -2110,7 +2110,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip.onnx")); auto test_case = test::TestCase(function); @@ -2158,7 +2158,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -2203,7 +2203,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse.onnx")); auto test_case = test::TestCase(function); @@ -2251,7 +2251,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h_const.onnx")); auto test_case = test::TestCase(function); test_case.add_input(in_X); @@ -2296,7 +2296,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h_ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h.onnx")); auto test_case = test::TestCase(function); @@ -2346,7 +2346,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional.onnx")); auto test_case = test::TestCase(function); @@ -2395,7 +2395,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional) NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_const) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional_const.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional_const.onnx")); auto test_case = test::TestCase(function); @@ -2442,7 +2442,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_const NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const_dynamic) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx")); auto test_case = test::TestCase(function); test_case.add_input(Shape{4, 3, 2}, in_X); @@ -2487,7 +2487,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const_ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_import_only_rnn_defaults_fwd_const_dynamic) { auto function = onnx_import::import_onnx_model(file_util::path_join( - SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.prototxt")); + SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx")); auto batch_size = Dimension::dynamic(); auto seq_length = Dimension::dynamic(); diff --git a/ngraph/test/onnx/onnx_import_with_editor.in.cpp b/ngraph/test/onnx/onnx_import_with_editor.in.cpp index 99ceef8011d..1650aa2fc8a 100644 --- a/ngraph/test/onnx/onnx_import_with_editor.in.cpp +++ b/ngraph/test/onnx/onnx_import_with_editor.in.cpp @@ -28,7 +28,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_0) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/compress_0.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/compress_0.onnx")}; std::map> in_vals; @@ -46,7 +46,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_0) NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_1) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/compress_1.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/compress_1.onnx")}; std::map> in_vals; @@ -64,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_1) NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_default_axis) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/compress_default_axis.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/compress_default_axis.onnx")}; std::map> in_vals; @@ -82,7 +82,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_default_axis) NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_negative_axis) { onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/compress_negative_axis.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/compress_negative_axis.onnx")}; std::map> in_vals; diff --git a/ngraph/test/onnx/onnx_tensor_names.cpp b/ngraph/test/onnx/onnx_tensor_names.cpp index e9a69187e8a..317b826736c 100644 --- a/ngraph/test/onnx/onnx_tensor_names.cpp +++ b/ngraph/test/onnx/onnx_tensor_names.cpp @@ -21,7 +21,7 @@ using Outputs = std::vector>; NGRAPH_TEST(onnx_tensor_names, simple_model) { auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/tensor_names.prototxt")); + file_util::path_join(SERIALIZED_ZOO, "onnx/tensor_names.onnx")); auto ops = function->get_ordered_ops(); ASSERT_EQ(ops[0]->get_friendly_name(), "input"); @@ -43,7 +43,7 @@ NGRAPH_TEST(onnx_tensor_names, simple_model) NGRAPH_TEST(onnx_tensor_names, node_multiple_outputs) { auto function = - onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.prototxt")); + onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.onnx")); auto ops = function->get_ordered_ops(); diff --git a/ngraph/test/onnx/onnx_test_utils.in.cpp b/ngraph/test/onnx/onnx_test_utils.in.cpp index d9fe105e98d..5e70e3e13c2 100644 --- a/ngraph/test/onnx/onnx_test_utils.in.cpp +++ b/ngraph/test/onnx/onnx_test_utils.in.cpp @@ -37,7 +37,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_add_abc_set_precission) const element::Type ng_type = element::from(); onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_3d.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_3d.onnx")}; editor.set_input_types({{"A", ng_type}, {"B", ng_type}, {"C", ng_type}}); @@ -56,7 +56,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_split_multioutput_set_precission) const element::Type ng_type = element::from(); onnx_editor::ONNXModelEditor editor{ - file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.prototxt")}; + file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.onnx")}; editor.set_input_types({{"input", ng_type}}); diff --git a/ngraph/test/requirements_test.txt b/ngraph/test/requirements_test.txt index f9f5ae3d96c..9615699d8bd 100644 --- a/ngraph/test/requirements_test.txt +++ b/ngraph/test/requirements_test.txt @@ -3,4 +3,6 @@ paddlepaddle==2.1.0 gast==0.3.3 numpy~=1.19.2 six~=1.15.0 - +# ONNX - generate test models +docopt~=0.6.2 +onnx~=1.9.0 \ No newline at end of file diff --git a/ngraph/test/requirements_test_onnx.txt b/ngraph/test/requirements_test_onnx.txt new file mode 100644 index 00000000000..4e7803c987b --- /dev/null +++ b/ngraph/test/requirements_test_onnx.txt @@ -0,0 +1,4 @@ +# ONNX - generate test models +docopt~=0.6.2 +onnx~=1.9.0 +protobuf>=3.9 \ No newline at end of file diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 5816387edd2..24e10be9f07 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -134,11 +134,7 @@ if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_IMPORT_ENABLE) endif() find_package(Protobuf 3.9.0 REQUIRED) set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) - if(NGRAPH_USE_PROTOBUF_LITE) - set(Protobuf_LIBRARIES ${Protobuf_LITE_LIBRARIES}) - else() - set(Protobuf_LIBRARIES protobuf::libprotobuf) - endif() + set(Protobuf_LIBRARIES protobuf::libprotobuf) set(SYSTEM_PROTOC protobuf::protoc) set(PROTOC_EXECUTABLE ${SYSTEM_PROTOC}) diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt index 9ddd64a4085..7cab74c6831 100644 --- a/thirdparty/protobuf/CMakeLists.txt +++ b/thirdparty/protobuf/CMakeLists.txt @@ -55,12 +55,6 @@ set(Protobuf_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/protobuf/src) # to hide libprotobuf warnings target_include_directories(libprotobuf-lite SYSTEM PRIVATE "${Protobuf_INCLUDE_DIRS}") -if(NGRAPH_USE_PROTOBUF_LITE) - set(Protobuf_LIBRARIES libprotobuf-lite) -else() - set(Protobuf_LIBRARIES libprotobuf) -endif() - if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") if(protobuf_BUILD_PROTOC_BINARIES) @@ -104,5 +98,5 @@ endif() set(protobuf_VERSION ${protobuf_VERSION} PARENT_SCOPE) set(Protobuf_LITE_LIBRARIES libprotobuf-lite PARENT_SCOPE) -set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} PARENT_SCOPE) +set(Protobuf_LIBRARIES libprotobuf-lite PARENT_SCOPE) set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS} PARENT_SCOPE)