Skip to content

Commit

Permalink
Merge branch 'master' into jiwaszki/pdm_requirements_poc
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos authored Apr 10, 2024
2 parents f0d88e2 + 7a10b94 commit b148660
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/job_debian_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 35 additions & 6 deletions src/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,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}
Expand All @@ -346,9 +348,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)
Expand Down
2 changes: 1 addition & 1 deletion src/frontends/tensorflow/docs/supported_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ A "supported operation" is one that TensorFlow Frontend can convert to the OpenV
| StringSplitV2<sup><mark style="background-color: #00FF00">NEW</mark></sup> | YES | openvino-tokenizers required |
| StringStrip | NO | |
| StringToHashBucket | NO | |
| StringToHashBucketFast | NO | |
| StringToHashBucketFast | YES | openvino-tokenizers required |
| StringToHashBucketStrong | NO | |
| StringToNumber | NO | |
| StringUpper | NO | |
Expand Down
7 changes: 6 additions & 1 deletion src/frontends/tensorflow/src/op_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,12 @@ const std::map<std::string, CreatorFunction> get_supported_ops() {
};

const std::vector<std::string> get_supported_ops_via_tokenizers() {
return {"RaggedTensorToSparse", "RaggedTensorToTensor", "StaticRegexReplace", "StringLower", "StringSplitV2"};
return {"RaggedTensorToSparse",
"RaggedTensorToTensor",
"StaticRegexReplace",
"StringLower",
"StringSplitV2",
"StringToHashBucketFast"};
}
} // namespace op
} // namespace tensorflow
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions thirdparty/telemetry
Submodule telemetry added at 58e16c

0 comments on commit b148660

Please sign in to comment.