diff --git a/.github/workflows/android_arm64.yml b/.github/workflows/android_arm64.yml index 9c7b1cf8b5cb1f..31e4ec4358f494 100644 --- a/.github/workflows/android_arm64.yml +++ b/.github/workflows/android_arm64.yml @@ -87,7 +87,6 @@ jobs: git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo popd - name: Clone vcpkg diff --git a/.github/workflows/job_debian_packages.yml b/.github/workflows/job_debian_packages.yml index 1124963034a496..b9c7823a191940 100644 --- a/.github/workflows/job_debian_packages.yml +++ b/.github/workflows/job_debian_packages.yml @@ -43,7 +43,7 @@ jobs: - name: Install debian packages & check conflicts run: | apt-get update -y - + if [[ "${{ runner.arch }}" == "X64" ]]; then # Install debian packages from previous release apt-get install --no-install-recommends -y gnupg wget ca-certificates @@ -66,21 +66,26 @@ jobs: run: | /usr/share/openvino/samples/cpp/build_samples.sh /usr/share/openvino/samples/c/build_samples.sh - + [[ "${{ runner.arch }}" == "X64" ]] && path_by_arch="intel64" || path_by_arch="aarch64" ~/openvino_cpp_samples_build/$path_by_arch/Release/hello_query_device - + + # check integrity of OpenVINO Python API installation + apt-get install python3-pip -y + python3 -m pip check + python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")' - + if [[ "${{ runner.arch }}" == "X64" ]]; then python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")' fi - + python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_PROPERTIES")' python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_PROPERTIES")' python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_PROPERTIES")' python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_PROPERTIES")' python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6' benchmark_app --help + opt_in_out --help ovc --help diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 61f46dca78cac5..b29e2801572865 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -760,16 +760,114 @@ jobs: path: ${{ env.EXTENSION_BUILD_DIR }}/*.whl if-no-files-found: 'error' - GPU_Stub: + GPU: + name: GPU ${{ matrix.TEST_TYPE }} Tests needs: [ Build, Smart_CI ] - runs-on: ubuntu-latest if: fromJSON(needs.smart_ci.outputs.affected_components).GPU + timeout-minutes: 80 + runs-on: [ self-hosted, gpu ] + strategy: + max-parallel: 2 + fail-fast: false + matrix: + TEST_TYPE: ['unit', 'func'] + container: + image: ubuntu:20.04 + options: --device /dev/dri:/dev/dri --group-add 109 --group-add 44 + volumes: + - /dev/dri:/dev/dri + defaults: + run: + shell: bash + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + INSTALL_DIR: ${{ github.workspace }}/install + INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests + GTEST_PARALLEL_SCRIPT: ${{ github.workspace }}/gtest_parallel.py steps: - - name: GPU stub + - name: Download OpenVINO package + uses: actions/download-artifact@v4 + with: + name: 'openvino_package' + path: ${{ env.INSTALL_DIR }} + + - name: Download OpenVINO tests package + uses: actions/download-artifact@v4 + with: + name: 'openvino_tests' + path: ${{ env.INSTALL_TEST_DIR }} + + # Needed as ${{ github.workspace }} is not working correctly when using Docker + - name: Setup Variables run: | - echo "This is only a stub to collect statistics of GPU runs filtered by Smart CI. - It will help us to estimate hardware requirements" - shell: bash + echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV" + echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV" + echo "GTEST_PARALLEL_SCRIPT=$GITHUB_WORKSPACE/gtest_parallel.py" >> "$GITHUB_ENV" + + - name: Extract OpenVINO packages + run: | + pushd $INSTALL_DIR + tar -xzf openvino_package.tar.gz -C $INSTALL_DIR + popd + pushd $INSTALL_TEST_DIR + tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR + popd + + - name: Install dependencies (Linux) + run: | + $INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + + apt-get update && apt-get install -y wget software-properties-common ca-certificates gpg-agent tzdata + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + TZ: "Europe/London" # to prevent tzdata from waiting user input + + - name: Setup Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Get gtest-parallel script + run: wget https://raw.githubusercontent.com/google/gtest-parallel/master/gtest_parallel.py + + - name: Install GPU Drivers + run: | + wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-core_1.0.15985.7_amd64.deb + wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-opencl_1.0.15985.7_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-level-zero-gpu-dbgsym_1.3.28454.6_amd64.ddeb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-level-zero-gpu_1.3.28454.6_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-opencl-icd-dbgsym_24.05.28454.6_amd64.ddeb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-opencl-icd_24.05.28454.6_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/libigdgmm12_22.3.11_amd64.deb + dpkg -i *.deb + + # + # Tests + # + + - name: OpenVINO GPU ${{ matrix.TEST_TYPE }} Tests + run: | + source ${INSTALL_DIR}/setupvars.sh + + rm -rf ${INSTALL_TEST_DIR}/gpu_${{ matrix.TEST_TYPE }}_tests && mkdir -p ${INSTALL_TEST_DIR}/gpu_${{ matrix.TEST_TYPE }}_tests + + test_filter='' + if [[ "${{ matrix.TEST_TYPE }}" == "unit" ]]; then + # Ticket: 138018 + test_filter='-*scatter_nd_update_gpu.dynamic_padded_output*:*border_gpu.basic_zero_input*:*bicubic_zeros_no_align_data1x1*:*bicubic_border_align_batches*:*bilinear_zeros_no_align_data1x1*:*non_zero_gpu.empty_input*:*mark_shape_of_subgraphs.concat_with_empty_tensor_inputs*:*concat_cpu_impl.dynamic_4d_f*:*border_gpu.basic_zero_input_dynamic*:*network_test.model_with_empty_input_is_not_dynamic*:*bicubic_zeros_align_data1x1*' + else + test_filter='*smoke*' + fi + python3 ${GTEST_PARALLEL_SCRIPT} ${INSTALL_TEST_DIR}/ov_gpu_${{ matrix.TEST_TYPE }}_tests --dump_json_test_results=${INSTALL_TEST_DIR}/gpu_${{ matrix.TEST_TYPE }}_tests/ov_gpu_${{ matrix.TEST_TYPE }}_tests.json -- --report_unique_name --gtest_filter=$test_filter + + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results-${{ matrix.TEST_TYPE }}-gpu + path: ${{ env.INSTALL_TEST_DIR }}/gpu_${{ matrix.TEST_TYPE }}_tests + if-no-files-found: 'error' Overall_Status: name: ci/gha_overall_status diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.yml index 3e0e13d21a7efb..eee8dc9c5e57ad 100644 --- a/.github/workflows/linux_arm64.yml +++ b/.github/workflows/linux_arm64.yml @@ -125,6 +125,9 @@ jobs: update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30 update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30 + # For building the latest h5py + apt install --assume-yes --no-install-recommends libhdf5-dev + - name: Install sccache uses: mozilla-actions/sccache-action@v0.0.4 with: diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml index 90a1e7c9480822..cb7bd0c8b0251f 100644 --- a/.github/workflows/linux_riscv.yml +++ b/.github/workflows/linux_riscv.yml @@ -107,6 +107,7 @@ jobs: git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags + git submodule update --init -- ${OPENVINO_REPO}/thirdparty/telemetry git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo popd diff --git a/.gitmodules b/.gitmodules index b483bfe8e9e171..c8bf9375572131 100644 --- a/.gitmodules +++ b/.gitmodules @@ -78,3 +78,6 @@ [submodule "src/plugins/intel_npu/thirdparty/level-zero-ext"] path = src/plugins/intel_npu/thirdparty/level-zero-ext url = https://github.com/intel/level-zero-npu-extensions.git +[submodule "thirdparty/telemetry"] + path = thirdparty/telemetry + url = https://github.com/openvinotoolkit/telemetry.git diff --git a/docs/articles_en/documentation/legacy-features/transition-legacy-conversion-api/legacy-conversion-api/[legacy]-supported-model-formats/[legacy]-conversion-tutorials/convert-tensorflow-yolo.rst b/docs/articles_en/documentation/legacy-features/transition-legacy-conversion-api/legacy-conversion-api/[legacy]-supported-model-formats/[legacy]-conversion-tutorials/convert-tensorflow-yolo.rst index 67c175c25bde21..10946ce84100da 100644 --- a/docs/articles_en/documentation/legacy-features/transition-legacy-conversion-api/legacy-conversion-api/[legacy]-supported-model-formats/[legacy]-conversion-tutorials/convert-tensorflow-yolo.rst +++ b/docs/articles_en/documentation/legacy-features/transition-legacy-conversion-api/legacy-conversion-api/[legacy]-supported-model-formats/[legacy]-conversion-tutorials/convert-tensorflow-yolo.rst @@ -58,12 +58,19 @@ This section explains how to convert the YOLOv4 Keras model from the `repository python keras-YOLOv3-model-set/tools/model_converter/convert.py /yolov4-tiny.cfg /yolov4-tiny.weights -4. Run model conversion for from the TensorFlow 2 format to an IR: +4. Run model conversion from the TensorFlow 2 to an IR format: .. note:: Before you run the conversion, make sure you have installed all the model conversion API dependencies for TensorFlow 2. + If you get errors, you may need to add the additional step to divide the input by 255: + + .. code-block:: sh + + --scale_values=image_input[255] + + .. code-block:: sh mo --saved_model_dir yolov4 --output_dir models/IRs --input_shape [1,608,608,3] --model_name yolov4 diff --git a/src/bindings/js/node/CMakeLists.txt b/src/bindings/js/node/CMakeLists.txt index 90ce599bdac7c8..5081a215b3cd80 100644 --- a/src/bindings/js/node/CMakeLists.txt +++ b/src/bindings/js/node/CMakeLists.txt @@ -57,6 +57,7 @@ add_library(${PROJECT_NAME} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/preprocess/resize_algorithm.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/errors.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/helper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/type_validation.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/tensor.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/infer_request.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/compiled_model.cpp diff --git a/src/bindings/js/node/include/helper.hpp b/src/bindings/js/node/include/helper.hpp index cce376bc2c9c88..ffd944b3589033 100644 --- a/src/bindings/js/node/include/helper.hpp +++ b/src/bindings/js/node/include/helper.hpp @@ -140,6 +140,9 @@ ov::Tensor get_request_tensor(ov::InferRequest& infer_request, const size_t idx) /** @brief Creates ov::tensor from TensorWrap Object */ ov::Tensor cast_to_tensor(const Napi::Value& value); +/** @brief Creates ov::tensor from Napi::CallbackInfo value at specified index. */ +ov::Tensor cast_to_tensor(const Napi::CallbackInfo& info, int index); + /** @brief Creates ov::tensor from TypedArray using given shape and element type*/ ov::Tensor cast_to_tensor(const Napi::TypedArray& data, const ov::Shape& shape, const ov::element::Type_t& type); diff --git a/src/bindings/js/node/include/type_validation.hpp b/src/bindings/js/node/include/type_validation.hpp new file mode 100644 index 00000000000000..2e699f1f96b8ad --- /dev/null +++ b/src/bindings/js/node/include/type_validation.hpp @@ -0,0 +1,11 @@ +// Copyright (C) 2018-2024 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#include + +#include "node/include/addon.hpp" +#include "openvino/openvino.hpp" + +/** @brief Checks if Napi::Value is a TensorWrap.*/ +bool is_tensor(const Napi::Env& env, const Napi::Value& value); diff --git a/src/bindings/js/node/src/helper.cpp b/src/bindings/js/node/src/helper.cpp index 002580aac56b74..b00fbb033c8447 100644 --- a/src/bindings/js/node/src/helper.cpp +++ b/src/bindings/js/node/src/helper.cpp @@ -4,6 +4,7 @@ #include "node/include/helper.hpp" #include "node/include/tensor.hpp" +#include "node/include/type_validation.hpp" const std::vector& get_supported_types() { static const std::vector supported_element_types = @@ -303,6 +304,14 @@ ov::Tensor cast_to_tensor(const Napi::Value& value) { } } +ov::Tensor cast_to_tensor(const Napi::CallbackInfo& info, int index) { + if (!is_tensor(info.Env(), info[index])) { + OPENVINO_THROW(std::string("Argument #" + std::to_string(index) + " must be a Tensor.")); + } + const auto tensor_wrap = Napi::ObjectWrap::Unwrap(info[index].ToObject()); + return tensor_wrap->get_tensor(); +} + ov::Tensor cast_to_tensor(const Napi::TypedArray& typed_array, const ov::Shape& shape, const ov::element::Type_t& type) { diff --git a/src/bindings/js/node/src/infer_request.cpp b/src/bindings/js/node/src/infer_request.cpp index 302548e691d7e5..a1bc3a5daa8b37 100644 --- a/src/bindings/js/node/src/infer_request.cpp +++ b/src/bindings/js/node/src/infer_request.cpp @@ -53,39 +53,45 @@ Napi::Object InferRequestWrap::wrap(Napi::Env env, ov::InferRequest infer_reques } void InferRequestWrap::set_tensor(const Napi::CallbackInfo& info) { - if (info.Length() != 2 || !info[0].IsString() || !info[1].IsObject()) { - reportError(info.Env(), "InferRequest.setTensor() invalid argument."); - } else { - std::string name = info[0].ToString(); - auto tensorWrap = Napi::ObjectWrap::Unwrap(info[1].ToObject()); - _infer_request.set_tensor(name, tensorWrap->get_tensor()); + try { + if (info.Length() != 2 || !info[0].IsString() || !info[1].IsObject()) { + OPENVINO_THROW(std::string("InferRequest.setTensor() invalid argument.")); + } else { + const std::string& name = info[0].ToString(); + _infer_request.set_tensor(name, cast_to_tensor(info, 1)); + } + } catch (std::exception& e) { + reportError(info.Env(), e.what()); } } void InferRequestWrap::set_input_tensor(const Napi::CallbackInfo& info) { - if (info.Length() == 1 && info[0].IsObject()) { - auto tensorWrap = Napi::ObjectWrap::Unwrap(info[0].ToObject()); - _infer_request.set_input_tensor(tensorWrap->get_tensor()); - } else if (info.Length() == 2 && info[0].IsNumber() && info[1].IsObject()) { - auto idx = info[0].ToNumber().Int32Value(); - auto tensorWrap = Napi::ObjectWrap::Unwrap(info[1].ToObject()); - _infer_request.set_input_tensor(idx, tensorWrap->get_tensor()); - } else { - reportError(info.Env(), "InferRequest.setInputTensor() invalid argument."); + try { + if (info.Length() == 1 && info[0].IsObject()) { + _infer_request.set_input_tensor(cast_to_tensor(info, 0)); + } else if (info.Length() == 2 && info[0].IsNumber() && info[1].IsObject()) { + const auto idx = info[0].ToNumber().Int32Value(); + _infer_request.set_input_tensor(idx, cast_to_tensor(info, 1)); + } else { + OPENVINO_THROW(std::string("InferRequest.setInputTensor() invalid argument.")); + } + } catch (std::exception& e) { + reportError(info.Env(), e.what()); } } void InferRequestWrap::set_output_tensor(const Napi::CallbackInfo& info) { - if (info.Length() == 1) { - auto tensorWrap = Napi::ObjectWrap::Unwrap(info[0].ToObject()); - auto t = tensorWrap->get_tensor(); - _infer_request.set_output_tensor(t); - } else if (info.Length() == 2 && info[0].IsNumber() && info[1].IsObject()) { - auto idx = info[0].ToNumber().Int32Value(); - auto tensorWrap = Napi::ObjectWrap::Unwrap(info[1].ToObject()); - _infer_request.set_output_tensor(idx, tensorWrap->get_tensor()); - } else { - reportError(info.Env(), "InferRequest.setOutputTensor() invalid argument."); + try { + if (info.Length() == 1 && info[0].IsObject()) { + _infer_request.set_output_tensor(cast_to_tensor(info, 0)); + } else if (info.Length() == 2 && info[0].IsNumber() && info[1].IsObject()) { + const auto idx = info[0].ToNumber().Int32Value(); + _infer_request.set_output_tensor(idx, cast_to_tensor(info, 1)); + } else { + OPENVINO_THROW(std::string("InferRequest.setOutputTensor() invalid argument.")); + } + } catch (std::exception& e) { + reportError(info.Env(), e.what()); } } diff --git a/src/bindings/js/node/src/type_validation.cpp b/src/bindings/js/node/src/type_validation.cpp new file mode 100644 index 00000000000000..08c6c0787130ee --- /dev/null +++ b/src/bindings/js/node/src/type_validation.cpp @@ -0,0 +1,9 @@ +// Copyright (C) 2018-2024 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 + +#include "node/include/type_validation.hpp" + +bool is_tensor(const Napi::Env& env, const Napi::Value& value) { + const auto& prototype = env.GetInstanceData()->tensor; + return value.ToObject().InstanceOf(prototype.Value().As()); +} diff --git a/src/bindings/js/node/tests/infer_request.test.js b/src/bindings/js/node/tests/infer_request.test.js index 98d7f4e809ffa6..27543233f573dc 100644 --- a/src/bindings/js/node/tests/infer_request.test.js +++ b/src/bindings/js/node/tests/infer_request.test.js @@ -63,6 +63,7 @@ describe('InferRequest', () => { ['string', 'Cannot create a tensor from the passed Napi::Value.'], [tensorData.slice(-10), 'Memory allocated using shape and element::type mismatch passed data\'s size'], [new Float32Array(buffer, 4), 'TypedArray.byteOffset has to be equal to zero.'], + [{}, /Invalid argument/], // Test for object that is not Tensor ]; inputMessagePairs.forEach( ([tl, msg]) => { @@ -114,22 +115,39 @@ describe('InferRequest', () => { assert.deepStrictEqual(tensor.data[0], t1.data[0]); }); + it('Test setInputTensor(object) throws when passed object is not a Tensor.', () => { + assert.throws( + () => inferRequest.setInputTensor({}), + {message: /Argument #[0-9]+ must be a Tensor./} + ); + }); + it('Test setInputTensor(idx, tensor)', () => { inferRequest.setInputTensor(0, tensor); const t1 = inferRequest.getInputTensor(); assert.deepStrictEqual(tensor.data[0], t1.data[0]); }); - it('Test setInputTensor() - pass two tensors', () => { + it('Test setInputTensor(idx, tensor) throws', () => { + const testIdx = 10; + assert.throws ( + () => inferRequest.setInputTensor(testIdx, tensor), + {message: /Input port for index [0-9]+ was not found!/} + ); + }); + + it('Test setInputTensor(idx, object) throws when passed object is not a Tensor.', () => { assert.throws( - () => inferRequest.setInputTensor(resTensor, tensor), - {message: 'InferRequest.setInputTensor() invalid argument.'}); + () => inferRequest.setInputTensor(0, {}), + {message: /Argument #[0-9]+ must be a Tensor./} + ); }); - it('Test setInputTensor() - pass number as a single arg', () => { + it('Test setInputTensor(tensor, tensor) throws', () => { assert.throws( - () => inferRequest.setInputTensor(123), - {message: 'InferRequest.setInputTensor() invalid argument.'}); + () => inferRequest.setInputTensor(resTensor, tensor), + {message: / invalid argument./} + ); }); it('Test setOutputTensor(tensor)', () => { @@ -138,16 +156,38 @@ describe('InferRequest', () => { assert.deepStrictEqual(resTensor.data[0], res2.data[0]); }); + it('Test setOutputTensor(object) throws when passed object is not a Tensor.', () => { + assert.throws( + () => inferRequest.setOutputTensor({}), + {message: /Argument #[0-9]+ must be a Tensor./} + ); + }); + + it('Test setOutputTensor(idx, tensor) throws', () => { + const testIdx = 10; + assert.throws ( + () => inferRequest.setOutputTensor(testIdx, tensor), + {message: /Output port for index [0-9]+ was not found!/} + ); + }); + it('Test setOutputTensor(idx, tensor)', () => { inferRequest.setOutputTensor(0, resTensor); const res2 = inferRequest.getOutputTensor(); assert.deepStrictEqual(resTensor.data[0], res2.data[0]); }); + it('Test setOutputTensor(idx, tensor) throws when passed object is not a Tensor.', () => { + assert.throws( + () => inferRequest.setOutputTensor(0, {}), + {message: /Argument #[0-9]+ must be a Tensor./} + ); + }); + it('Test setOutputTensor() - pass two tensors', () => { assert.throws( () => inferRequest.setOutputTensor(resTensor, tensor), - {message: 'InferRequest.setOutputTensor() invalid argument.'}); + {message: / invalid argument./}); }); it('Test setTensor(string, tensor)', () => { @@ -157,22 +197,38 @@ describe('InferRequest', () => { assert.deepStrictEqual(resTensor.data[0], res2.data[0]); }); + it('Test setTensor(string, object) - throws', () => { + const testName = 'testName'; + assert.throws( + () => inferRequest.setTensor(testName, tensor), + {message: /Port for tensor name testName was not found./}); + }); + + it('Test setTensor(string, object) - throws', () => { + assert.throws( + () => inferRequest.setTensor('fc_out', {}), + {message: /Argument #[0-9]+ must be a Tensor./}); + }); + it('Test setTensor(string, tensor) - pass one arg', () => { assert.throws( () => inferRequest.setTensor('fc_out'), - {message: 'InferRequest.setTensor() invalid argument.'}); + {message: / invalid argument./} + ); }); it('Test setTensor(string, tensor) - pass args in wrong order', () => { assert.throws( () => inferRequest.setTensor(resTensor, 'fc_out'), - {message: 'InferRequest.setTensor() invalid argument.'}); + {message: / invalid argument./} + ); }); it('Test setTensor(string, tensor) - pass number as first arg', () => { assert.throws( () => inferRequest.setTensor(123, 'fc_out'), - {message: 'InferRequest.setTensor() invalid argument.'}); + {message: / invalid argument/} + ); }); const irGetters = compiledModel.createInferRequest(); diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index d13cb2e99db1fa..6cf43ec3fed72b 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -317,12 +317,14 @@ if(ENABLE_PYTHON_PACKAGING) set(ov_site_packages "site-packages") endif() + # install OpenVINO Python API + set(python_package_prefix "${CMAKE_CURRENT_BINARY_DIR}/install_${pyversion}") set(install_lib "${python_package_prefix}/lib/${python_versioned_folder}/${ov_site_packages}") - set(meta_info_subdir "openvino-${OpenVINO_VERSION}-py${python_xy}.egg-info") - set(meta_info_file "${install_lib}/${meta_info_subdir}/PKG-INFO") + set(openvino_meta_info_subdir "openvino-${OpenVINO_VERSION}-py${python_xy}.egg-info") + set(openvino_meta_info_file "${install_lib}/${openvino_meta_info_subdir}/PKG-INFO") - add_custom_command(OUTPUT ${meta_info_file} + add_custom_command(OUTPUT ${openvino_meta_info_file} COMMAND ${CMAKE_COMMAND} -E remove_directory "${python_package_prefix}" COMMAND ${setup_py_env} @@ -344,9 +346,36 @@ if(ENABLE_PYTHON_PACKAGING) --record=installed.txt WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" DEPENDS ${ov_setup_py_deps} - COMMENT "Create python package with ${meta_info_subdir} folder") - - add_custom_target(_python_api_package ALL DEPENDS ${meta_info_file}) + COMMENT "Create python package with ${openvino_meta_info_subdir} folder") + + # Install OpenVINO Telemetry + + set(OpenVINO_Telemetry_SOURCE_DIR "${OpenVINO_SOURCE_DIR}/thirdparty/telemetry") + file(GLOB_RECURSE telemetry_files ${OpenVINO_Telemetry_SOURCE_DIR}/*) + + set(openvino_telemetry_meta_info_subdir "openvino-telemetry-${OpenVINO_VERSION}-py${python_xy}.egg-info") + set(openvino_telemetry_meta_info_file "${install_lib}/${openvino_telemetry_meta_info_subdir}/PKG-INFO") + + add_custom_command(OUTPUT ${openvino_telemetry_meta_info_file} + COMMAND "${Python3_EXECUTABLE}" "${OpenVINO_Telemetry_SOURCE_DIR}/setup.py" + --no-user-cfg + --quiet + build + --executable "/usr/bin/python3" + install + --no-compile + --prefix "${python_package_prefix}" + --install-lib "${install_lib}" + --install-scripts "${python_package_prefix}/bin" + --single-version-externally-managed + --record=installed.txt + WORKING_DIRECTORY "${OpenVINO_Telemetry_SOURCE_DIR}" + DEPENDS ${telemetry_files} + COMMENT "Create python package with ${openvino_telemetry_meta_info_subdir} folder") + + # create custom target + + add_custom_target(_python_api_package ALL DEPENDS ${openvino_meta_info_file} ${openvino_telemetry_meta_info_file}) # install python package, which will be later packed into DEB | RPM ov_cpack_add_component(${OV_CPACK_COMP_PYTHON_OPENVINO}_package_${pyversion} HIDDEN) diff --git a/src/frontends/tensorflow/docs/supported_ops.md b/src/frontends/tensorflow/docs/supported_ops.md index f206839f3aacbb..7206a2af141041 100644 --- a/src/frontends/tensorflow/docs/supported_ops.md +++ b/src/frontends/tensorflow/docs/supported_ops.md @@ -1227,7 +1227,7 @@ A "supported operation" is one that TensorFlow Frontend can convert to the OpenV | StringSplitV2NEW | YES | openvino-tokenizers required | | StringStrip | NO | | | StringToHashBucket | NO | | -| StringToHashBucketFast | NO | | +| StringToHashBucketFast | YES | openvino-tokenizers required | | StringToHashBucketStrong | NO | | | StringToNumber | NO | | | StringUpper | NO | | diff --git a/src/frontends/tensorflow/src/op_table.cpp b/src/frontends/tensorflow/src/op_table.cpp index e2abb859e3bc75..3422148db2d771 100644 --- a/src/frontends/tensorflow/src/op_table.cpp +++ b/src/frontends/tensorflow/src/op_table.cpp @@ -461,7 +461,12 @@ const std::map get_supported_ops() { }; const std::vector get_supported_ops_via_tokenizers() { - return {"RaggedTensorToSparse", "RaggedTensorToTensor", "StaticRegexReplace", "StringLower", "StringSplitV2"}; + return {"RaggedTensorToSparse", + "RaggedTensorToTensor", + "StaticRegexReplace", + "StringLower", + "StringSplitV2", + "StringToHashBucketFast"}; } } // namespace op } // namespace tensorflow diff --git a/src/plugins/template/tests/functional/op_reference/conversion.hpp b/src/plugins/template/tests/functional/op_reference/conversion.hpp index afe549b471ae79..a50200b391d122 100644 --- a/src/plugins/template/tests/functional/op_reference/conversion.hpp +++ b/src/plugins/template/tests/functional/op_reference/conversion.hpp @@ -27,15 +27,13 @@ struct ConvertParams { const ov::element::Type& iType, const ov::element::Type& oType, const std::vector& iValues, - const std::vector& oValues, - size_t iSize = 0, - size_t oSize = 0) + const std::vector& oValues) : conversionType(convType), pshape(shape), inType(iType), outType(oType), - inputData(CreateTensor(iType, iValues, iSize)), - refData(CreateTensor(oType, oValues, oSize)) {} + inputData(CreateTensor(shape.get_shape(), iType, iValues)), + refData(CreateTensor(shape.get_shape(), oType, oValues)) {} ConversionTypes conversionType; ov::PartialShape pshape; ov::element::Type inType; diff --git a/src/plugins/template/tests/functional/op_reference/convert.cpp b/src/plugins/template/tests/functional/op_reference/convert.cpp index c92c6e5340c2c1..69026e88ff1c27 100644 --- a/src/plugins/template/tests/functional/op_reference/convert.cpp +++ b/src/plugins/template/tests/functional/op_reference/convert.cpp @@ -254,15 +254,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::f32, std::vector{0xA0}, - std::vector{1.0f, 0.0f, 1.0f, 0.0f}, - 4), + std::vector{1.0f, 0.0f, 1.0f, 0.0f}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{2, 2}, ov::element::u4, ov::element::f32, std::vector{0xBF, 0xA0}, - std::vector{15.0f, 11.0f, 0.0f, 10.0f}, - 4), + std::vector{15.0f, 11.0f, 0.0f, 10.0f}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{2, 2}, ov::element::u8, @@ -292,8 +290,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::f32, std::vector{0xEF, 0x2F}, - std::vector{-1.0f, -2.0f, -1.0f, 2.0f}, - 4), + std::vector{-1.0f, -2.0f, -1.0f, 2.0f}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{2, 2}, ov::element::i8, @@ -402,128 +399,98 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i4, std::vector{0xA0}, - std::vector{0x01, 0x01}, - 4, - 4), + std::vector{0x01, 0x01}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::i4, std::vector{0x12, 0x03}, - std::vector{0x12, 0x03}, - 4, - 4), + std::vector{0x12, 0x03}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u16, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u32, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u64, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i4, ov::element::i4, std::vector{0xFE, 0x03}, - std::vector{0xFE, 0x03}, - 4, - 4), + std::vector{0xFE, 0x03}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i16, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i32, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i64, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::f16, ov::element::i4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::bf16, ov::element::i4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::f32, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), // destination i8 ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u1, ov::element::i8, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::i8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -553,8 +520,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -603,15 +569,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i16, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::i16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -641,8 +605,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -691,15 +654,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i32, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::i32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -729,8 +690,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -779,15 +739,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i64, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::i64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -817,8 +775,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -868,113 +825,85 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u1, std::vector{0xA0}, - std::vector{0xA0}, - 8, - 8), + std::vector{0xA0}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u4, ov::element::u1, std::vector{0x01, 0x10, 0x00, 0x00}, - std::vector{0x90}, - 8, - 8), + std::vector{0x90}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u8, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::u64, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::i4, ov::element::u1, std::vector{0x01, 0x10, 0x00, 0x00}, - std::vector{0x90}, - 8, - 8), + std::vector{0x90}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::i8, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::i16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::i32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::i64, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::f16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::bf16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{8}, ov::element::f32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), // destination u4 ConvertParams(ConversionTypes::CONVERT, @@ -982,113 +911,85 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u4, std::vector{0xA0}, - std::vector{0x01, 0x01}, - 4, - 4), + std::vector{0x01, 0x01}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::u4, std::vector{0x12, 0x03}, - std::vector{0x12, 0x03}, - 4, - 4), + std::vector{0x12, 0x03}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u16, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u32, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u64, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i4, ov::element::u4, std::vector{0xFE, 0x03}, - std::vector{0xFE, 0x03}, - 4, - 4), + std::vector{0xFE, 0x03}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i16, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i32, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i64, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::f16, ov::element::u4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::bf16, ov::element::u4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::f32, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), // destination u8 ConvertParams(ConversionTypes::CONVERT, @@ -1096,15 +997,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u8, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::u8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -1134,8 +1033,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -1185,15 +1083,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u16, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::u16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -1223,8 +1119,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -1274,15 +1169,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u32, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::u32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -1312,8 +1205,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, @@ -1362,15 +1254,13 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u64, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u4, ov::element::u64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::u8, @@ -1400,8 +1290,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT, ov::PartialShape{4}, ov::element::i8, diff --git a/src/plugins/template/tests/functional/op_reference/convert_like.cpp b/src/plugins/template/tests/functional/op_reference/convert_like.cpp index 60462c51e9ecf1..43d50daecafa79 100644 --- a/src/plugins/template/tests/functional/op_reference/convert_like.cpp +++ b/src/plugins/template/tests/functional/op_reference/convert_like.cpp @@ -26,22 +26,19 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u2, ov::element::boolean, std::vector{0b10010011}, - std::vector{1, 1, 0, 1}, - 4), + std::vector{1, 1, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::boolean, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 1, 0, 1, 0, 0, 0, 1}, - 8), + std::vector{0, 1, 0, 1, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::boolean, std::vector{0x21, 0x03, 0x00}, - std::vector{1, 1, 0, 1}, - 4), + std::vector{1, 1, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 3}, ov::element::u8, @@ -84,22 +81,19 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u2, ov::element::bf16, std::vector{0b10010011}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::bf16, std::vector{0x21, 0x03, 0x00}, - std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}, - 8), + std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::bf16, std::vector{0x21, 0x03, 0x00}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams( ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 1, 3, 5}, @@ -122,22 +116,19 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u2, ov::element::f16, std::vector{0b10010011}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::f16, std::vector{0x21, 0x03, 0x00}, - std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}, - 8), + std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::f16, std::vector{0x21, 0x03, 0x00}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams( ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 1, 3, 5}, @@ -160,36 +151,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::f32, std::vector{0xA0}, - std::vector{1.0f, 0.0f, 1.0f, 0.0f}, - 4), + std::vector{1.0f, 0.0f, 1.0f, 0.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::f32, std::vector{0b10010011}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::f32, std::vector{0x21, 0x03, 0x00}, - std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}, - 8), + std::vector{0.0f, 2.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 2}, ov::element::u4, ov::element::f32, std::vector{0xBF, 0xA0}, - std::vector{15.0f, 11.0f, 0.0f, 10.0f}, - 4), + std::vector{15.0f, 11.0f, 0.0f, 10.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::f32, std::vector{0x21, 0x03, 0x00}, - std::vector{2.0f, 1.0f, 0.0f, 3.0f}, - 4), + std::vector{2.0f, 1.0f, 0.0f, 3.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 2}, ov::element::u8, @@ -219,8 +205,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::f32, std::vector{0xEF, 0x2F}, - std::vector{-1.0f, -2.0f, -1.0f, 2.0f}, - 4), + std::vector{-1.0f, -2.0f, -1.0f, 2.0f}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 2}, ov::element::i8, @@ -328,173 +313,134 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i4, std::vector{0xA0}, - std::vector{0x01, 0x01}, - 4, - 4), + std::vector{0x01, 0x01}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::i4, std::vector{0b10010011}, - std::vector{0x12, 0x30}, - 4, - 4), + std::vector{0x12, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::i4, std::vector{0x21, 0x03, 0x00}, - std::vector{0x20, 0x10, 0x00, 0x30}, - 8, - 8), + std::vector{0x20, 0x10, 0x00, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::i4, std::vector{0x12, 0x03}, - std::vector{0x12, 0x03}, - 4, - 4), + std::vector{0x12, 0x03}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::i4, std::vector{0x21, 0x03, 0x00}, - std::vector{0x12, 0x30}, - 4, - 4), + std::vector{0x12, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u16, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u32, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u64, ov::element::i4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i4, ov::element::i4, std::vector{0xFE, 0x03}, - std::vector{0xFE, 0x03}, - 4, - 4), + std::vector{0xFE, 0x03}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i16, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i32, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i64, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::f16, ov::element::i4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::bf16, ov::element::i4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::f32, ov::element::i4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), // destination i8 ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u1, ov::element::i8, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::i8, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::i8, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::i8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::i8, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -524,8 +470,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -574,36 +519,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i16, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::i16, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::i16, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::i16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::i16, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -633,8 +573,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -683,36 +622,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i32, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::i32, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::i32, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::i32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::i32, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -742,8 +676,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -792,36 +725,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::i64, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::i64, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::i64, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::i64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::i64, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -851,8 +779,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::i64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -902,136 +829,103 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u1, std::vector{0xA0}, - std::vector{0xA0}, - 8, - 8), + std::vector{0xA0}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u2, ov::element::u1, std::vector{0b10010011, 0x00}, - std::vector{0b01010000}, - 8, - 8), + std::vector{0b01010000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u1, std::vector{0x21, 0x03, 0x00}, - std::vector{0b00010001}, - 8), + std::vector{0b00010001}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u4, ov::element::u1, std::vector{0x01, 0x10, 0x00, 0x00}, - std::vector{0x90}, - 8, - 8), + std::vector{0x90}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u6, ov::element::u1, std::vector{0x21, 0x03, 0x00, 0x00, 0x00, 0x00}, - std::vector{0b01010000}, - 8, - 8), + std::vector{0b01010000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u8, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u64, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::i4, ov::element::u1, std::vector{0x01, 0x10, 0x00, 0x00}, - std::vector{0x90}, - 8, - 8), + std::vector{0x90}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::i8, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::i16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::i32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::i64, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::f16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::bf16, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::f32, ov::element::u1, std::vector{1, 0, 1, 0, 0, 0, 0, 1}, - std::vector{0xA1}, - 8, - 8), + std::vector{0xA1}), // destination u4 ConvertParams(ConversionTypes::CONVERT_LIKE, @@ -1039,137 +933,103 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u4, std::vector{0xA0}, - std::vector{0x01, 0x01}, - 4, - 4), + std::vector{0x01, 0x01}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::u4, std::vector{0b10010011}, - std::vector{0x12, 0x30}, - 4, - 4), + std::vector{0x12, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u4, std::vector{0x21, 0x03, 0x00}, - std::vector{0x20, 0x10, 0x00, 0x30}, - 8, - 8), + std::vector{0x20, 0x10, 0x00, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::u4, std::vector{0x12, 0x03}, - std::vector{0x12, 0x03}, - 4, - 4), + std::vector{0x12, 0x03}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::u4, std::vector{0x21, 0x03, 0x00}, - std::vector{0x12, 0x30}, - 4, - 4), + std::vector{0x12, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u16, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u32, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u64, ov::element::u4, std::vector{1, 2, 0, 3}, - std::vector{0x21, 0x30}, - 4, - 4), + std::vector{0x21, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i4, ov::element::u4, std::vector{0xFE, 0x03}, - std::vector{0xFE, 0x03}, - 4, - 4), + std::vector{0xFE, 0x03}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i16, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i32, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i64, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::f16, ov::element::u4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::bf16, ov::element::u4, std::vector{-1, -2, 0, 3}, - std::vector{0xEF, 0x30}, - 4, - 4), + std::vector{0xEF, 0x30}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::f32, ov::element::u4, std::vector{-1, -2, 2, 3}, - std::vector{0xEF, 0x32}, - 4, - 4), + std::vector{0xEF, 0x32}), // destination u8 ConvertParams(ConversionTypes::CONVERT_LIKE, @@ -1177,36 +1037,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u8, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::u8, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u8, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::u8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::u8, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -1236,8 +1091,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u8, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -1287,36 +1141,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u16, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::u16, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u16, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::u16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::u16, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -1346,8 +1195,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u16, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -1397,36 +1245,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u32, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::u32, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u32, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::u32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::u32, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -1456,8 +1299,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u32, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -1506,36 +1348,31 @@ INSTANTIATE_TEST_SUITE_P( ov::element::u1, ov::element::u64, std::vector{0x81}, - std::vector{1, 0, 0, 0, 0, 0, 0, 1}, - 8), + std::vector{1, 0, 0, 0, 0, 0, 0, 1}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u2, ov::element::u64, std::vector{0b10010011}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{8}, ov::element::u3, ov::element::u64, std::vector{0x21, 0x03, 0x00}, - std::vector{0, 2, 0, 1, 0, 0, 0, 3}, - 8), + std::vector{0, 2, 0, 1, 0, 0, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u4, ov::element::u64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u6, ov::element::u64, std::vector{0x21, 0x03, 0x00}, - std::vector{2, 1, 0, 3}, - 4), + std::vector{2, 1, 0, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::u8, @@ -1565,8 +1402,7 @@ INSTANTIATE_TEST_SUITE_P( ov::element::i4, ov::element::u64, std::vector{0x12, 0x34}, - std::vector{2, 1, 4, 3}, - 4), + std::vector{2, 1, 4, 3}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{4}, ov::element::i8, @@ -1615,460 +1451,346 @@ INSTANTIATE_TEST_SUITE_P( ov::element::f32, ov::element::nf4, std::vector{-0.6961928009986877f, 0.7229568362236023f, 1.0f, -0.5250730514526367f}, - std::vector{0xE1, 0x2F}, - 4, - 4), + std::vector{0xE1, 0x2F}), // destination u2 ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::boolean, ov::element::u2, std::vector{1, 0, 1, 1, 0, 1, 0, 0}, - std::vector{0b01000101, 0b00010000}, - 8, - 8), + std::vector{0b01000101, 0b00010000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u1, ov::element::u2, std::vector{0b11001011}, - std::vector{0x50, 0x45}, - 8, - 8), + std::vector{0x50, 0x45}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u3, ov::element::u2, std::vector{0b00100111, 0b00011010, 0b00001000}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u4, ov::element::u2, std::vector{0x21, 0x01, 0x31, 0xff}, - std::vector{0b01100100, 0b01111111}, - 8, - 8), + std::vector{0b01100100, 0b01111111}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u6, ov::element::u2, std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}, - std::vector{0b00100111, 0b00010000}, - 8, - 8), + std::vector{0b00100111, 0b00010000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u8, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u16, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u32, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u64, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i4, ov::element::u2, std::vector{0x21, 0x01, 0x31, 0xff}, - std::vector{0b01100100, 0b01111111}, - 8, - 8), + std::vector{0b01100100, 0b01111111}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i8, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i16, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i32, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i64, ov::element::u2, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::f8e4m3, ov::element::u2, std::vector{0.1f, 2.0f, 1.1f, 3.0f, 4.0f, 1.0f, 2.2f, 2.8f}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f16, ov::element::u2, std::vector{0.1f, 2.0f, 1.1f, 3.0f, 4.0f, 1.0f, 2.2f, 2.8f}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f32, ov::element::u2, std::vector{0.1f, 2.0f, 1.1f, 3.0f, 4.0f, 1.0f, 2.2f, 2.8f}, - std::vector{0b00100111, 0b00011010}, - 8, - 8), + std::vector{0b00100111, 0b00011010}), // destination u3 ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::boolean, ov::element::u3, std::vector{1, 0, 1, 1, 0, 1, 0, 0}, - std::vector{0b01000101, 0b00010000, 0x00}, - 8, - 8), + std::vector{0b01000101, 0b00010000, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u1, ov::element::u3, std::vector{0b11001011}, - std::vector{0b01010000, 0b01000101, 0x00}, - 8, - 8), + std::vector{0b01010000, 0b01000101, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u2, ov::element::u3, std::vector{0b00100111, 0b00011010}, - std::vector{0b00100111, 0b00011010, 0x00}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u4, ov::element::u3, std::vector{0x21, 0x01, 0x31, 0xff}, - std::vector{0b01100100, 0b01111111, 0b00000011}, - 8, - 8), + std::vector{0b01100100, 0b01111111, 0b00000011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u6, ov::element::u3, std::vector{0x02, 0x13, 0x00, 0x41, 0x26, 0x00}, - std::vector{0b00100111, 0b00011010, 0b00001001}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0b00001001}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u8, ov::element::u3, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010, 0b00001000}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0b00001000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u16, ov::element::u3, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010, 0b00001000}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0b00001000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u32, ov::element::u3, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010, 0b00001000}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0b00001000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u64, ov::element::u3, std::vector{0, 2, 1, 3, 4, 1, 2, 2}, - std::vector{0b00100111, 0b00011010, 0b00001000}, - 8, - 8), + std::vector{0b00100111, 0b00011010, 0b00001000}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i8, ov::element::u3, std::vector{0, 2, 1, -3, 4, -1, 8, 7}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i16, ov::element::u3, std::vector{0, 2, 1, -3, 4, -1, 8, 7}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i32, ov::element::u3, std::vector{0, 2, 1, -3, 4, -1, 8, 7}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i64, ov::element::u3, std::vector{0, 2, 1, -3, 4, -1, 8, 7}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f8e4m3, ov::element::u3, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 4.0f, -1.0f, 8.0f, 7.2f}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f8e5m2, ov::element::u3, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 4.0f, -1.0f, 8.0f, 7.2f}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f16, ov::element::u3, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 4.0f, -1.0f, 8.0f, 7.2f}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::bf16, ov::element::u3, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 4.0f, -1.0f, 8.0f, 7.2f}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f32, ov::element::u3, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 4.0f, -1.0f, 8.0f, 7.2f}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f64, ov::element::u3, std::vector{0.0, 2.1, 1.7, -3.1, 4.0, -1.0, 8.0, 7.2}, - std::vector{0b00100101, 0b00110011, 0b00011101}, - 8, - 8), + std::vector{0b00100101, 0b00110011, 0b00011101}), // destination u6 ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::boolean, ov::element::u6, std::vector{1, 0, 1, 1, 0, 1, 0, 0}, - std::vector{0x10, 0x11, 0x00, 0x01, 0x00, 0x00}, - 8, - 8), + std::vector{0x10, 0x11, 0x00, 0x01, 0x00, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u1, ov::element::u6, std::vector{0b11001011}, - std::vector{0x11, 0x00, 0x00, 0x10, 0x11, 0x00}, - 8, - 8), + std::vector{0x11, 0x00, 0x00, 0x10, 0x11, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u2, ov::element::u6, std::vector{0b00100111, 0b00010000}, - std::vector{0x02, 0x13, 0x00, 0x01, 0x00, 0x00}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x01, 0x00, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{1, 8}, ov::element::u3, ov::element::u6, std::vector{0b00100111, 0b00011010, 0b00001001}, - std::vector{0x02, 0x13, 0x00, 0x41, 0x26, 0x00}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x41, 0x26, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u4, ov::element::u6, std::vector{0x21, 0x01, 0x31, 0xff}, - std::vector{0x12, 0x10, 0x00, 0x13, 0xff, 0x00}, - 8, - 8), + std::vector{0x12, 0x10, 0x00, 0x13, 0xff, 0x00}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u8, ov::element::u6, std::vector{0, 2, 1, 3, 24, 1, 32, 52}, - std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u16, ov::element::u6, std::vector{0, 2, 1, 3, 24, 1, 32, 52}, - std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u32, ov::element::u6, std::vector{0, 2, 1, 3, 24, 1, 32, 52}, - std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::u64, ov::element::u6, std::vector{0, 2, 1, 3, 24, 1, 32, 52}, - std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}, - 8, - 8), + std::vector{0x02, 0x13, 0x00, 0x81, 0x04, 0b01001011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i4, ov::element::u6, std::vector{0x21, 0x01, 0x31, 0xff}, - std::vector{0x12, 0x10, 0x00, 0x13, 0xff, 0b00001111}, - 8, - 8), + std::vector{0x12, 0x10, 0x00, 0x13, 0xff, 0b00001111}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i8, ov::element::u6, std::vector{0, 2, 1, -3, 24, -1, 32, 52}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i16, ov::element::u6, std::vector{0, 2, 1, -3, 24, -1, 32, 52}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i32, ov::element::u6, std::vector{0, 2, 1, -3, 24, -1, 32, 52}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::i64, ov::element::u6, std::vector{0, 2, 1, -3, 24, -1, 32, 52}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f8e4m3, ov::element::u6, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 24.0f, -1.0f, 32.0f, 52.0f}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f8e5m2, ov::element::u6, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 24.0f, -1.0f, 32.0f, 56.0f}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x08, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x08, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f16, ov::element::u6, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 24.0f, -1.0f, 32.0f, 52.0f}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::bf16, ov::element::u6, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 24.0f, -1.0f, 32.0f, 52.0f}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f32, ov::element::u6, std::vector{0.0f, 2.1f, 1.7f, -3.1f, 24.0f, -1.0f, 32.0f, 52.0f}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}), ConvertParams(ConversionTypes::CONVERT_LIKE, ov::PartialShape{2, 4}, ov::element::f64, ov::element::u6, std::vector{0.0, 2.1, 1.7, -3.1, 24.0, -1.0, 32.0, 52.0}, - std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011}, - 8, - 8)), + std::vector{0x02, 0x1d, 0b00000011, 0x8f, 0x04, 0b01111011})), ReferenceConversionLayerTest::getTestCaseName); } // namespace } // namespace ConversionOpsRefTestDefinitions diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Round.py b/tests/layer_tests/tensorflow_tests/test_tf_Round.py new file mode 100644 index 00000000000000..dde79166a16f3a --- /dev/null +++ b/tests/layer_tests/tensorflow_tests/test_tf_Round.py @@ -0,0 +1,31 @@ +# Copyright (C) 2018-2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +import pytest +import tensorflow as tf +from common.tf_layer_test_class import CommonTFLayerTest + +class TestRound(CommonTFLayerTest): + def create_tf_round_net(self, input_shape, input_type): + tf.compat.v1.reset_default_graph() + with tf.compat.v1.Session() as sess: + input = tf.compat.v1.placeholder(input_type, input_shape, 'input') + tf.raw_ops.Round(x=input) + tf.compat.v1.global_variables_initializer() + tf_net = sess.graph_def + + ref_net = None + + return tf_net, ref_net + + @pytest.mark.parametrize("input_shape", [[6], [2, 5, 3], [10, 5, 1, 5]]) + @pytest.mark.parametrize("input_type", [tf.float32, tf.int32, tf.int64, tf.float64]) + @pytest.mark.precommit + @pytest.mark.nightly + def test_round_basic(self, input_shape, input_type, ie_device, precision, + ir_version, temp_dir, use_legacy_frontend): + if ie_device == 'GPU' and input_type in [tf.int32, tf.int64]: + pytest.skip("GPU error: Requested activation is not supported for integer type") + self._test(*self.create_tf_round_net(input_shape, input_type), + ie_device, precision, ir_version, temp_dir=temp_dir, + use_legacy_frontend=use_legacy_frontend) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_StringToHashBucketFast.py b/tests/layer_tests/tensorflow_tests/test_tf_StringToHashBucketFast.py new file mode 100644 index 00000000000000..08812fe7b46228 --- /dev/null +++ b/tests/layer_tests/tensorflow_tests/test_tf_StringToHashBucketFast.py @@ -0,0 +1,60 @@ +# Copyright (C) 2018-2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +import platform + +import numpy as np +import pytest +import tensorflow as tf +from common.tf_layer_test_class import CommonTFLayerTest +from common.utils.tf_utils import run_in_jenkins + +rng = np.random.default_rng() + + +class TestStringToHashBucketFast(CommonTFLayerTest): + def _prepare_input(self, inputs_info): + assert 'input:0' in inputs_info + input_shape = inputs_info['input:0'] + inputs_data = {} + sample_data = rng.choice(self.strings_dictionary, input_shape) + inputs_data['input:0'] = sample_data + return inputs_data + + def create_string_to_hash_bucket_fast_net(self, input_shape, strings_dictionary, num_buckets): + self.strings_dictionary = strings_dictionary + + tf.compat.v1.reset_default_graph() + with tf.compat.v1.Session() as sess: + input = tf.compat.v1.placeholder(tf.string, input_shape, 'input') + tf.raw_ops.StringToHashBucketFast(input=input, num_buckets=num_buckets) + + tf.compat.v1.global_variables_initializer() + tf_net = sess.graph_def + + ref_net = None + + return tf_net, ref_net + + @pytest.mark.parametrize("input_shape", [[], [2], [3, 4], [1, 3, 2]]) + @pytest.mark.parametrize("num_buckets", [1, 4, 7, 11]) + @pytest.mark.parametrize("strings_dictionary", + [['UPPER CASE SENTENCE', 'lower case sentence', ' UppEr LoweR CAse SENtence', ' '], + ['Первое Предложение', 'второе предложение', ' ', ' ТРЕТЬЕ ПРЕДЛОЖЕНИЕ '], + ['第一句話在這裡', '第二句話在這裡', '第三句話在這裡'], + ['', ' ', '12345 ']]) + @pytest.mark.precommit + @pytest.mark.nightly + @pytest.mark.xfail(condition=platform.system() in ('Darwin', 'Linux') and platform.machine() in ['arm', 'armv7l', + 'aarch64', + 'arm64', 'ARM64'], + reason='Ticket - 126314, 132699') + def test_string_to_hash_bucket_fast(self, input_shape, num_buckets, strings_dictionary, ie_device, precision, + ir_version, temp_dir, + use_legacy_frontend): + if ie_device == 'GPU' or run_in_jenkins(): + pytest.skip("operation extension is not supported on GPU") + self._test(*self.create_string_to_hash_bucket_fast_net(input_shape=input_shape, num_buckets=num_buckets, + strings_dictionary=strings_dictionary), + ie_device, precision, ir_version, temp_dir=temp_dir, + use_legacy_frontend=use_legacy_frontend) diff --git a/thirdparty/telemetry b/thirdparty/telemetry new file mode 160000 index 00000000000000..58e16c257a512e --- /dev/null +++ b/thirdparty/telemetry @@ -0,0 +1 @@ +Subproject commit 58e16c257a512ec7f451c9fccf9ff455065b285b