Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/bf16_weight…
Browse files Browse the repository at this point in the history
…s_compression
  • Loading branch information
maxnick committed Jul 1, 2024
2 parents 890ec7e + 5dab586 commit 1f39b19
Show file tree
Hide file tree
Showing 118 changed files with 7,546 additions and 700 deletions.
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
'category: TF FE':
- 'src/frontends/tensorflow/**/*'
- 'src/frontends/tensorflow_common/**/*'
- 'src/bindings/python/src/openvino/frontend/tensorflow/**/*'
- 'tests/layer_tests/tensorflow_tests/**/*'
- 'tests/layer_tests/tensorflow2_keras_tests/**/*'
- 'tests/layer_tests/jax_tests/**/*'
Expand All @@ -163,6 +164,7 @@

'category: JAX FE':
- 'src/frontends/jax/**/*'
- 'src/bindings/python/src/openvino/frontend/jax/**/*'
- 'tests/layer_tests/jax_tests/**/*'

'category: tools':
Expand Down
11 changes: 6 additions & 5 deletions cmake/developer_package/api_validator/api_validator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#

function(ov_search_api_validator)
macro(ov_search_api_validator)
if(NOT ENABLE_API_VALIDATOR)
return()
endif()
Expand All @@ -15,8 +15,6 @@ function(ov_search_api_validator)
string(REPLACE "\\" "" WINDOWS_SDK_VERSION $ENV{WindowsSDKVersion})
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION})
message(STATUS "Use ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} Windows SDK version")
# set to parent scope as well for later usage in '_ov_add_api_validator_post_build_step'
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION} PARENT_SCOPE)
else()
message(FATAL_ERROR "WindowsSDKVersion environment variable is not set,\
can't find Windows SDK version. Try to use vcvarsall.bat script")
Expand Down Expand Up @@ -47,9 +45,12 @@ can't find Windows SDK version. Try to use vcvarsall.bat script")
message(STATUS "Found apivalidator: ${ONECORE_API_VALIDATOR}")
endif()
endif()
endfunction()
endmacro()


ov_search_api_validator()
if(ENABLE_API_VALIDATOR)
ov_search_api_validator()
endif()

function(_ov_add_api_validator_post_build_step_recursive)
cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN})
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# symbolic links
set(OV_CPACK_COMP_LINKS_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# npu internal tools
unset(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL)
endmacro()

ov_define_component_include_rules()
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/common-libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# symbolic links
set(OV_CPACK_COMP_LINKS_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# npu internal tools
set(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/debian/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# symbolic links
set(OV_CPACK_COMP_LINKS_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# npu internal tools
set(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/npm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ macro(ov_define_component_include_rules)
unset(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL)
# symbolic links
unset(OV_CPACK_COMP_LINKS_EXCLUDE_ALL)
# npu internal tools
set(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/nsis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# symbolic links
set(OV_CPACK_COMP_LINKS_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# npu internal tools
set(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/rpm/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PKG_CONFIG_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# symbolic links
set(OV_CPACK_COMP_LINKS_EXCLUDE_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
# npu internal tools
set(OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()
Expand Down
4 changes: 2 additions & 2 deletions docs/articles_en/about-openvino/performance-benchmarks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ You can also test performance for your system yourself, following the guide on


* Intel® Distribution of OpenVINO™ toolkit performance results are based on release
2024.2, as of June 17, 2024.
2024.2, as of June 28, 2024.

* OpenVINO Model Server performance results are based on release
2024.1, as of April 26, 2024.
2024.2, as of June 28, 2024.

The results may not reflect all publicly available updates. Intel technologies' features and
benefits depend on system configuration and may require enabled hardware, software, or service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ omitting training-related parameter.

* **4**: ``attention_mask`` - two options available. ``attention_mask`` is ignored if ``causal`` is set to ``True``. **Optional.**

* at least 3 dimensional tensor of type *T* or ``boolean`` and shape ``[N, ..., L, S]``.
* at least 2 dimensional tensor of type *T* or ``boolean`` and shape numpy-broadcastable to ``[N, ..., L, S]``. See :doc:`Numpy Broadcast Rules <../../broadcast-rules>` for broadcast details.

* a scalar of type *T* with value ``0``. Scalar zero value signals that applying an attention mask is not necessary (similar to specifying attention_mask=None in the provided pseudo-code).

* **5**: ``scale`` a scalar tensor of type *T*, an alternative scale factor instead of 1/sqrt(query.shape[-1]) used by default in the pseudo-code above. **Optional.**
* **5**: ``scale`` a scalar or single element 1D tensor of type *T*, an alternative scale factor instead of 1/sqrt(query.shape[-1]) used by default in the pseudo-code above. **Optional.**


**Outputs**
Expand All @@ -78,7 +78,7 @@ omitting training-related parameter.

**Dimensions**

* ``N, ...`` - one or more batch dimensions. Each batch dimension should be either constant across the input tensors (query, key, and value), indicating that they have the same batch size, or they should be broadcastable to the same value.
* ``N, ...`` - one or more batch dimensions. Each batch dimension should be either constant across the input tensors (query, key, and value), indicating that they have the same batch size, or they should be numpy-broadcastable to the same value. See :doc:`Numpy Broadcast Rules <../../broadcast-rules>` for broadcast details.

* ``S`` - source sequence length

Expand Down Expand Up @@ -192,29 +192,29 @@ Other batch dimensions ``...`` are optional.
<input>
<!-- Multiple batch dimensions, broadcastable to the following values: N1 = 4, N2 = 6, N3 = 10-->
<port id="0" precision="FP32"> <!-- query -->
<dim>1</dim> <!-- N1 (repeat 4 times) -->
<dim>4</dim> <!-- N1 (repeat 1 time) -->
<dim>6</dim> <!-- N2 (repeat 1 time)-->
<dim>5</dim> <!-- N3 (repeat 2 times)-->
<dim>10</dim> <!-- N3 (repeat 1 time)-->
<dim>-1</dim> <!-- L -->
<dim>80</dim> <!-- E -->
</port>
<port id="1" precision="FP32"> <!-- key -->
<dim>2</dim> (repeat 2 times)<!-- N1 -->
<dim>2</dim> (repeat 3 times)<!-- N2 -->
<dim>2</dim> (repeat 5 times)<!-- N3 -->
<dim>1</dim> <!-- N1 (repeat 4 times) -->
<dim>6</dim> <!-- N2 (repeat 1 time) -->
<dim>10</dim> <!-- N3 (repeat 1 time) -->
<dim>-1</dim> <!-- S -->
<dim>80</dim> <!-- E -->
</port>
<port id="2" precision="FP32"> <!-- value -->
<dim>4</dim> <!-- N1 (repeat 1 time)-->
<dim>3</dim> <!-- N2 (repeat 2 times)-->
<dim>10</dim> <!-- N3 (repeat 1 time)-->
<dim>1</dim> <!-- N1 (repeat 4 times)-->
<dim>1</dim> <!-- N2 (repeat 6 times)-->
<dim>1</dim> <!-- N3 (repeat 10 times)-->
<dim>-1</dim> <!-- S -->
<dim>80</dim> <!-- Ev -->
</port>
<port id="3" precision="FP32"> <!-- attention_mask -->
<dim>1</dim> <!-- N1 (repeat 4 times)-->
<dim>2</dim> <!-- N2 (repeat 3 times)-->
<dim>1</dim> <!-- N2 (repeat 6 times)-->
<dim>1</dim> <!-- N3 (repeat 10 times)-->
<dim>-1</dim> <!-- L -->
<dim>-1</dim> <!-- S -->
Expand All @@ -231,3 +231,42 @@ Other batch dimensions ``...`` are optional.
</port>
</output>
</layer>
*Example 5: With attention mask broadcasting*

.. code-block:: xml
:force:
<layer id="285" name="aten::scaled_dot_product_attention_0" type="ScaledDotProductAttention" version="opset13">
<data causal="false" />
<input>
<!-- Example with simple dimensions, with N = 2, L = 16, S = 32, E = 80, Ev = 80-->
<port id="0" precision="FP32"> <!-- query -->
<dim>2</dim> <!-- N -->
<dim>16</dim> <!-- L -->
<dim>80</dim> <!-- E -->
</port>
<port id="1" precision="FP32"> <!-- key -->
<dim>2</dim> <!-- N -->
<dim>32</dim> <!-- S -->
<dim>80</dim> <!-- E -->
</port>
<port id="2" precision="FP32"> <!-- value -->
<dim>2</dim> <!-- N -->
<dim>32</dim> <!-- S -->
<dim>80</dim> <!-- Ev -->
</port>
<port id="3" precision="FP32"> <!-- attention_mask -->
<dim>2</dim> <!-- N -->
<dim>1</dim> <!-- to be broadcasted to L -->
<dim>1</dim> <!-- to be broadcasted to S -->
</port>
</input>
<output>
<port id="4" precision="FP32">
<dim>2</dim> <!-- N -->
<dim>16</dim> <!-- L -->
<dim>80</dim> <!-- Ev -->
</port>
</output>
</layer>
Loading

0 comments on commit 1f39b19

Please sign in to comment.