Skip to content

Commit

Permalink
Merge branch 'master' into gn_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Dołbniak authored Jun 28, 2023
2 parents 5469f65 + 88fa4b0 commit 39310a4
Show file tree
Hide file tree
Showing 78 changed files with 2,707 additions and 951 deletions.
2 changes: 1 addition & 1 deletion cmake/packaging/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ macro(ov_cpack_settings)
# - 2022.1.1, 2022.2 do not have debian packages enabled, distributed only as archives
# - 2022.3 is the first release where Debian updated packages are introduced, others 2022.3.X are LTS
2022.3.0 2022.3.1 2022.3.2 2022.3.3 2022.3.4 2022.3.5
2023.0.0
2023.0.0 2023.0.1
)

#
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ macro(ov_cpack_settings)
# - 2022.1.1, 2022.2 do not have rpm packages enabled, distributed only as archives
# - 2022.3 is the first release where RPM updated packages are introduced, others 2022.3.X are LTS
2022.3.0 2022.3.1 2022.3.2 2022.3.3 2022.3.4 2022.3.5
2023.0.0
2023.0.0 2023.0.1
)

find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
Expand Down
1 change: 1 addition & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ ul#navbar-main-elements li:first-of-type {

ul#navbar-main-elements > li:hover {
text-decoration: underline;
color: #fff;
}


Expand Down
10 changes: 5 additions & 5 deletions docs/_static/css/homepage_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#openvino-documentation > h1 {
display: none;
}
img {
cursor: default;
}
h1 {
font-size: var(--pst-font-size-h2);
margin-bottom: 3rem;
/*font-size: var(--pst-font-size-h2);*/
/*margin-bottom: 3rem;*/
display: none!important;
}


#ov-homepage-banner, .openvino-diagram, .ov-homepage-higlight-grid {
margin-bottom: 90px!important;
}
Expand Down
20 changes: 6 additions & 14 deletions docs/home.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.. OpenVINO Toolkit documentation master file, created by
sphinx-quickstart on Wed Jul 7 10:46:56 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
============================
OpenVINO 2023.0
============================

.. meta::
:google-site-verification: _YqumYQ98cmXUTwtzM_0WIIadtDc6r_TMYGbmGgNvrk
Expand Down Expand Up @@ -34,8 +33,6 @@
:align: center




.. grid:: 2 2 3 3
:class-container: ov-homepage-higlight-grid

Expand Down Expand Up @@ -75,11 +72,8 @@
Reach for performance with post-training and training-time compression with NNCF





Feature Overview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##############################

.. grid:: 1 2 2 2
:class-container: ov-homepage-feature-grid
Expand Down Expand Up @@ -109,9 +103,6 @@ Feature Overview






.. toctree::
:maxdepth: 2
:hidden:
Expand All @@ -122,4 +113,5 @@ Feature Overview
DOCUMENTATION <documentation>
MODEL ZOO <model_zoo>
RESOURCES <resources>
RELEASE NOTES <https://software.intel.com/content/www/us/en/develop/articles/openvino-relnotes.html>
RELEASE NOTES <release_notes>

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ OpenVINO™ Documentation
Install <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>
Blog <https://blog.openvino.ai/>
Forum <https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/bd-p/distribution-openvino-toolkit>
Training <https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/learn/certification.html>
Support <https://www.intel.com/content/www/us/en/support/products/96066/software/development-software/openvino-toolkit.html>
GitHub <https://github.com/openvinotoolkit>
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Step 1: Download and Install OpenVINO Core Components
``C:\Program Files (x86)\Intel`` is the recommended folder. You may also use a different path if desired or if you don't have administrator privileges on your computer.


2. Download the `OpenVINO Runtime archive file for Windows <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/windows/>`__ to your local ``Downloads`` folder.
2. Download the `OpenVINO Runtime archive file for Windows <https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.0/windows/>`__ to your local ``Downloads`` folder.

If you prefer using command-lines, run the following commands in the command prompt window you opened:

Expand Down
14 changes: 11 additions & 3 deletions docs/resources/prerelease_information.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ Please file a github Issue on these with the label “pre-release” so we can g
* NOT subject to official support.
* Subject to change in the future.
* Introduced to allow early testing and get early feedback from the community.


.. dropdown:: OpenVINO Toolkit 2023.0.0.dev20230427
:open:


.. dropdown:: OpenVINO Toolkit 2023.0.0.dev20230407
:animate: fade-in-slide-down
:color: primary

The first pre-release for OpenVINO 2023.1 focused on fixing bugs and performance issues.



.. dropdown:: OpenVINO Toolkit 2023.0.0.dev20230407
:animate: fade-in-slide-down
:color: secondary

Note that a new distribution channel has been introduced for C++ developers: `Conda Forge <https://anaconda.org/conda-forge/openvino>`__
(the 2022.3.0 release is available there now).

Expand Down
18 changes: 18 additions & 0 deletions docs/resources/release_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Release Notes {#release_notes}

@sphinxdirective

.. raw:: html

<meta http-equiv="Refresh" content="0; url='https://software.intel.com/content/www/us/en/develop/articles/openvino-relnotes.html'" />


.. toctree::
:hidden:

prerelease_information

The official OpenVINO Release Notes are published at `intel.com <https://software.intel.com/content/www/us/en/develop/articles/openvino-relnotes.html>`__


@endsphinxdirective
1 change: 0 additions & 1 deletion docs/resources/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
:hidden:

openvino_docs_performance_benchmarks
prerelease_information

.. toctree::
:maxdepth: 1
Expand Down
14 changes: 12 additions & 2 deletions src/common/snippets/include/snippets/lowered/loop_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,19 @@ class LinearIR::LoopManager {
LinearIR::constExprIt loop_end_pos,
size_t loop_depth, size_t vector_size);
// Return Loop ID
template <typename T>
size_t mark_loop(LinearIR::constExprIt loop_begin_pos,
LinearIR::constExprIt loop_end_pos,
size_t work_amount, size_t work_amount_increment, size_t dim_idx,
const std::vector<ExpressionPort>& entries,
const std::vector<ExpressionPort>& exits);
const std::vector<T>& entries,
const std::vector<T>& exits) {
const auto loop_info = std::make_shared<LoopManager::LoopInfo>(work_amount, work_amount_increment, dim_idx, entries, exits);
const auto loop_id = this->add_loop_info(loop_info);
for (auto expr_it = loop_begin_pos; expr_it != loop_end_pos; ++expr_it) {
insert_loop_id(*expr_it, loop_id);
}
return loop_id;
}

void fuse_loops(const LinearIR& linear_ir, size_t loop_id_upper, size_t loop_id_lower, bool fuse_into_upper = true);
void fuse_loops(LinearIR::constExprIt loop_begin_target, LinearIR::constExprIt loop_end_target,
Expand Down Expand Up @@ -123,6 +131,8 @@ class LinearIR::LoopManager {
LinearIR::constExprIt& loop_end_pos,
size_t loop_id, bool loop_ops_inserted = false);

LoopPort get_loop_port_by_expr_port(const ExpressionPort& expr_port, const size_t loop_id);

private:
static void get_io_loop_ports(LinearIR::constExprIt loop_begin_pos,
LinearIR::constExprIt loop_end_pos,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class FuseLoops : public Pass {
FuseLoops();
bool run(LinearIR& linear_ir) override;

// This method checks that all ports which connect lower and upper loops are incremented.
// This helps to avoid fusing for the ports with incompleted data
static bool loop_ports_are_compatible(const LinearIR::LoopManagerPtr& loop_manager,
const size_t loop_lower_id,
const size_t loop_upper_id);

private:
static bool can_be_fused(const LinearIR::LoopManager::LoopInfoPtr& loop_current,
const LinearIR::LoopManager::LoopInfoPtr& loop_target);
Expand Down
46 changes: 46 additions & 0 deletions src/common/snippets/include/snippets/lowered/pass/split_loops.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright (C) 2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#pragma once

#include "pass.hpp"
#include "snippets/lowered/loop_manager.hpp"

namespace ov {
namespace snippets {
namespace lowered {
namespace pass {

/**
* @interface SplitLoops
* @brief If loop_1 has larger increment but the same works amount of loop_2, that follows loop_1, then split loop_2
* into two loops so the outermost of the split loops could be fused with the loop_1 using the pass `FuseLoops`.
* Example:
* Loop_1_begin Loop_1_begin Loop_1_begin
* ... ... ...
* Loop_1_end (wa = 128, inc = 32) Loop_1_end (wa = 128, inc = 32) Split_loop_2_begin
* ... Splitting ... Fusing ...
* Loop_2_begin => Split_loop_1_begin => Split_loop_2_end (wa = 32, inc = 1)
* ... Split_loop_2_begin ...
* Loop_2_end (wa = 128, inc = 1) ... Loop_1_end (wa = 128, inc = 32)
* Split_loop_2_end (wa = 32, inc = 1)
* Split_loop_1_end (wa = 128, inc = 32)
* @ingroup snippets
*/

class SplitLoops : public Pass {
public:
OPENVINO_RTTI("SplitLoops", "Pass")
SplitLoops();
bool run(LinearIR& linear_ir) override;

private:
static bool can_be_split(const LinearIR::LoopManager::LoopInfoPtr& current,
const LinearIR::LoopManager::LoopInfoPtr& target);
};

} // namespace pass
} // namespace lowered
} // namespace snippets
} // namespace ov
6 changes: 5 additions & 1 deletion src/common/snippets/include/snippets/op/subgraph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ class Subgraph : public ov::op::util::SubGraphOp {
ov::pass::Manager& pre_common,
ov::pass::Manager& post_common,
ov::pass::Manager& post_precision,
lowered::pass::PassPipeline& target_lowered_markup_pipeline,
lowered::pass::PassPipeline& target_lowered_pipeline,
const void* compile_params = nullptr);
snippets::Schedule generate(const BlockedShapeVector& output_shapes, const BlockedShapeVector& input_shapes, const void* compile_params = nullptr);
snippets::Schedule generate(ov::pass::Manager& pre_common,
ov::pass::Manager& post_common,
ov::pass::Manager& post_precision,
lowered::pass::PassPipeline& target_lowered_markup_pipeline,
lowered::pass::PassPipeline& target_lowered_pipeline,
const void* compile_params = nullptr);
snippets::Schedule generate(const void* compile_params = nullptr);
Expand Down Expand Up @@ -144,7 +146,9 @@ class Subgraph : public ov::op::util::SubGraphOp {
private:
void align_element_types(const BlockedShapeVector& outputShapes, const BlockedShapeVector& inputShapes);
void data_flow_transformations(ov::pass::Manager& pre_common, ov::pass::Manager& post_common, ov::pass::Manager& post_precision);
void control_flow_transformations(lowered::LinearIR& linear_ir, lowered::pass::PassPipeline& target_pipeline);
void control_flow_transformations(lowered::LinearIR& linear_ir,
lowered::pass::PassPipeline& target_markup_pipeline,
lowered::pass::PassPipeline& target_pipeline);
void init_config();
// Count of Subgraph virtual ports:
// - Potential non-scalar Constants that will be created after some transformations (At the moment it's relevant only for FakeQuantize decomposition)
Expand Down
24 changes: 12 additions & 12 deletions src/common/snippets/src/lowered/loop_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ void LinearIR::LoopManager::get_loop_bounds(const LinearIR &linear_ir,
}
}

LinearIR::LoopManager::LoopPort LinearIR::LoopManager::get_loop_port_by_expr_port(const ExpressionPort& expr_port, const size_t loop_id) {
auto get_loop_port = [&](const std::vector<LinearIR::LoopManager::LoopPort>& ports) {
auto it = std::find_if(ports.cbegin(), ports.cend(), [&](const LinearIR::LoopManager::LoopPort& p) { return *p.expr_port == expr_port; });
if (it == ports.cend())
OPENVINO_THROW("Expression has not been found among loop ports. Loop id: " + std::to_string(loop_id));
return *it;
};
const auto& loop_info = get_loop_info(loop_id);
return expr_port.get_type() == ExpressionPort::Input ? get_loop_port(loop_info->entry_points)
: get_loop_port(loop_info->exit_points);
}

void LinearIR::LoopManager::get_io_loop_ports(LinearIR::constExprIt loop_begin_pos,
LinearIR::constExprIt loop_end_pos,
std::vector<ExpressionPort> &entries,
Expand Down Expand Up @@ -211,18 +223,6 @@ void LinearIR::LoopManager::mark_loop(LinearIR::constExprIt loop_begin_pos,
}
}

size_t LinearIR::LoopManager::mark_loop(LinearIR::constExprIt loop_begin_pos,
LinearIR::constExprIt loop_end_pos,
size_t work_amount, size_t work_amount_increment, size_t dim_idx,
const std::vector<ExpressionPort>& entries,
const std::vector<ExpressionPort>& exits) {
const auto loop_info = std::make_shared<LoopManager::LoopInfo>(work_amount, work_amount_increment, dim_idx, entries, exits);
const auto loop_id = this->add_loop_info(loop_info);
for (auto expr_it = loop_begin_pos; expr_it != loop_end_pos; ++expr_it) {
insert_loop_id(*expr_it, loop_id);
}
return loop_id;
}
void LinearIR::LoopManager::fuse_loops(const LinearIR& linear_ir, size_t loop_id_upper, size_t loop_id_lower, bool fuse_into_upper) {
LinearIR::constExprIt loop_begin_target, loop_end_target;
get_loop_bounds(linear_ir, fuse_into_upper ? loop_id_lower : loop_id_upper, loop_begin_target, loop_end_target);
Expand Down
21 changes: 19 additions & 2 deletions src/common/snippets/src/lowered/pass/fuse_loops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ using LoopInfoPtr = LoopManager::LoopInfoPtr;

FuseLoops::FuseLoops() : Pass() {}

bool FuseLoops::loop_ports_are_compatible(const LinearIR::LoopManagerPtr& loop_manager,
const size_t loop_lower_id,
const size_t loop_upper_id) {
const auto loop_lower = loop_manager->get_loop_info(loop_lower_id);
for (const auto& entry : loop_lower->entry_points) {
const auto& src_port = entry.expr_port->get_port_connector_ptr()->get_source();
if (is_loop_id_found(src_port.get_expr()->get_loop_ids(), loop_upper_id)) {
if (!entry.is_incremented)
return false;
auto src_loop_port = loop_manager->get_loop_port_by_expr_port(src_port, loop_upper_id);
if (!src_loop_port.is_incremented)
return false;
}
}
return true;
}

bool FuseLoops::can_be_fused(const LoopInfoPtr& loop_current, const LoopInfoPtr& loop_target) {
auto current_work_amount = loop_current->work_amount;
auto target_work_amount = loop_target->work_amount;
Expand Down Expand Up @@ -79,7 +96,7 @@ bool FuseLoops::fuse_upper_into_current(LinearIR& linear_ir, const LinearIR::Loo
LinearIR::constExprIt& current_loop_begin_pos, LinearIR::constExprIt& current_loop_end_pos) {
const auto& loop_current = loop_manager->get_loop_info(current_loop_id);
const auto& loop_target = loop_manager->get_loop_info(target_loop_id);
if (!can_be_fused(loop_current, loop_target))
if (!can_be_fused(loop_current, loop_target) || !loop_ports_are_compatible(loop_manager, current_loop_id, target_loop_id))
return false;

// We can fuse Loop_up to Loop_down only in cases when other consumers of Loop_up are after Loop_down
Expand Down Expand Up @@ -129,7 +146,7 @@ bool FuseLoops::fuse_lower_into_current(LinearIR& linear_ir, const LinearIR::Loo
LinearIR::constExprIt& current_loop_begin_pos, LinearIR::constExprIt& current_loop_end_pos) {
const auto& loop_current = loop_manager->get_loop_info(current_loop_id);
const auto& loop_target = loop_manager->get_loop_info(target_loop_id);
if (!can_be_fused(loop_current, loop_target))
if (!can_be_fused(loop_current, loop_target) || !loop_ports_are_compatible(loop_manager, target_loop_id, current_loop_id))
return false;

// We can fuse Loop_down to Loop_up only in cases when other parents of Loop_down are before Loop_up
Expand Down
7 changes: 6 additions & 1 deletion src/common/snippets/src/lowered/pass/init_loops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ void InitLoops::init_ptr_increments(std::vector<LoopPort>& loop_inputs, std::vec
const auto& layout = port->get_descriptor_ptr()->get_layout();
const auto& shape = port->get_descriptor_ptr()->get_shape();
const auto& dim = *(layout.rbegin() + dim_idx);
// Ticket: 113106
// WA: the current logic doesn't support the case with transposed output shape for brgemm layer
// but for all existing cases planar layout can be used
std::vector<size_t> planar(layout.size());
std::iota(planar.begin(), planar.end(), 0);
loop_output.ptr_increment = 0;
// If relevant dim is not broadcasted, then ptr_increment is the dim stride in the new layout
if (loop_output.is_incremented && !(shape[dim] == 1 && work_amount != 1)) {
loop_output.ptr_increment = get_dim_stride(dim, layout, shape);
loop_output.ptr_increment = get_dim_stride(dim, planar, shape);
}
}
}
Expand Down
Loading

0 comments on commit 39310a4

Please sign in to comment.