Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tj/rtti/matcher_p…
Browse files Browse the repository at this point in the history
…ass_macro-transformations-op_convertions
  • Loading branch information
t-jankowski committed Dec 19, 2024
2 parents 8e5c7ae + e8f906e commit c2c6933
Show file tree
Hide file tree
Showing 171 changed files with 901 additions and 485 deletions.
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-27597
pr-27882
6 changes: 5 additions & 1 deletion .github/dockerfiles/ov_build/fedora_29/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ FROM ${REGISTRY}/library/fedora:29

USER root

RUN yum update -y && yum install -y \
# dnf configuration
RUN echo "timeout=60" >> /etc/dnf/dnf.conf && \
echo "retries=10" >> /etc/dnf/dnf.conf

RUN dnf update -y && dnf install -y \
git \
curl \
python3 \
Expand Down
6 changes: 5 additions & 1 deletion .github/dockerfiles/ov_test/fedora_33/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ FROM ${REGISTRY}/library/fedora:33

USER root

RUN yum update -y && yum install -y \
# dnf configuration
RUN echo "timeout=60" >> /etc/dnf/dnf.conf && \
echo "retries=10" >> /etc/dnf/dnf.conf

RUN dnf update -y && dnf install -y \
git \
curl \
python3 \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fedora_29.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ jobs:
# install previous release version
mv /tmp/openvino-2023.repo /etc/yum.repos.d
yum install -y openvino
dnf install -y openvino
# install current version
yum install --allowerasing -y *.rpm
dnf install --allowerasing -y *.rpm
working-directory: ${{ env.RPM_PACKAGES_DIR }}

- name: Test RPM packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationIntervals;
*/
class ov::pass::low_precision::AlignQuantizationIntervals : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("AlignQuantizationIntervals", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::AlignQuantizationIntervals");
AlignQuantizationIntervals(const std::vector<ov::element::Type>& defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support());
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationParameters;
*/
class ov::pass::low_precision::AlignQuantizationParameters : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("AlignQuantizationParameters", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::AlignQuantizationParameters");
AlignQuantizationParameters(const std::vector<ov::element::Type> defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support());
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LP_TRANSFORMATIONS_API LowPrecision;

class ov::pass::low_precision::MarkupOptimizations : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("MarkupOptimizations", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupOptimizations");
MarkupOptimizations(
const std::vector<PrecisionsRestriction>& precisionRestrictions,
const std::vector<QuantizationGranularityRestriction>& quantizationRestrictions,
Expand All @@ -62,7 +62,7 @@ class ov::pass::low_precision::TypeRelaxedReplacer : public ov::pass::GraphRewri

class LP_TRANSFORMATIONS_API ov::pass::low_precision::LowPrecision : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("LowPrecision", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::LowPrecision");
LowPrecision(
const std::vector<PrecisionsRestriction>& precisionRestrictions = {},
const std::vector<QuantizationGranularityRestriction>& quantizationRestrictions = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LP_TRANSFORMATIONS_API MarkupAvgPoolPrecisionPreserved;
*/
class ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("MarkupAvgPoolPrecisionPreserved", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupAvgPoolPrecisionPreserved");
MarkupAvgPoolPrecisionPreserved(const std::vector<ov::element::Type> defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support());
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LP_TRANSFORMATIONS_API MarkupCanBeQuantized;
*/
class ov::pass::low_precision::MarkupCanBeQuantized : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("MarkupCanBeQuantized", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupCanBeQuantized");
MarkupCanBeQuantized(const std::vector<ov::element::Type> defaultPrecisions = { ov::element::u8, ov::element::i8 });
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class LP_TRANSFORMATIONS_API MarkupPrecisions;
*/
class ov::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupPrecisions");
class Restriction {
public:
class RestrictionByVersion {
Expand Down Expand Up @@ -65,7 +66,6 @@ class ov::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass {
std::unordered_map<std::string, RestrictionByVersion> precisionsByVersion;
};

OPENVINO_RTTI("MarkupPrecisions", "0");
explicit MarkupPrecisions(const std::vector<PrecisionsRestriction>& restrictions = {},
const std::vector<ov::element::Type>& defaultPrecisions = { ov::element::u8, ov::element::i8 });
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class LP_TRANSFORMATIONS_API MarkupQuantizationGranularity;
*/
class ov::pass::low_precision::MarkupQuantizationGranularity : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupQuantizationGranularity");

class PerTensorQuantization {
public:
explicit PerTensorQuantization(const bool versionIsRequired) : versionIsRequired(versionIsRequired) {}
Expand All @@ -45,7 +47,6 @@ class ov::pass::low_precision::MarkupQuantizationGranularity : public ov::pass::
std::unordered_map<std::string, std::vector<PortQuantizationGranularityRestriction>> portsByVersion;
};

OPENVINO_RTTI("MarkupPerTensorQuantization", "0");
explicit MarkupQuantizationGranularity(const std::vector<QuantizationGranularityRestriction>& restrictions = {});
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API PropagatePrecisions;
*/
class ov::pass::low_precision::PropagatePrecisions : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("PropagatePrecisions", "0");
OPENVINO_MODEL_PASS_RTTI("low_precision::PropagatePrecisions");
PropagatePrecisions(const AttributeParameters& params = AttributeParameters());
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class LP_TRANSFORMATIONS_API PropagateSharedValue;
template <class AttributeType>
class ov::pass::low_precision::PropagateSharedValue : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("low_precision::PropagateSharedValue");
bool run_on_model(const std::shared_ptr<ov::Model>& f) override {
OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "PropagateSharedValue");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

class SimpleLowPrecisionTransformer : public ov::pass::ModelPass{
public:
OPENVINO_MODEL_PASS_RTTI("SimpleLowPrecisionTransformer");
SimpleLowPrecisionTransformer(
const std::vector<ov::pass::low_precision::PrecisionsRestriction>& precisionRestrictions = {},
const std::vector<ov::pass::low_precision::QuantizationGranularityRestriction>& quantizationRestrictions = {},
Expand Down
4 changes: 2 additions & 2 deletions src/common/offline_transformations/include/pruning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ov::pass::PropagateMasks : public ov::pass::GraphRewrite {
*/
class ov::pass::ShrinkWeights : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("ShrinkWeights", "0");
OPENVINO_MODEL_PASS_RTTI("ShrinkWeights");
bool run_on_model(const std::shared_ptr<ov::Model>&) override;
};

Expand All @@ -77,6 +77,6 @@ class ov::pass::ShrinkWeights : public ov::pass::ModelPass {
*/
class ov::pass::Pruning : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("Pruning", "0");
OPENVINO_MODEL_PASS_RTTI("Pruning");
bool run_on_model(const std::shared_ptr<Model>&) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class AlignElementTypes: public ov::pass::ModelPass {
public:
OPENVINO_RTTI("AlignElementTypes");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::AlignElementTypes");
AlignElementTypes(std::vector<ov::element::Type> input_precisions,
std::vector<ov::element::Type> output_precisions);
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class AnalyzeBroadcastableInputs : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("AnalyzeBroadcastableInputs");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::AnalyzeBroadcastableInputs");
// [Index of Parameter -> Index of broadcastable dimension from end]
using BroadcastableInputsMap = std::map<size_t, size_t>;
AnalyzeBroadcastableInputs(BroadcastableInputsMap& map);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
*/
class Canonicalization: public ov::pass::ModelPass {
public:
OPENVINO_RTTI("Canonicalization");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::Canonicalization");
using BlockedShapeVector = op::Subgraph::BlockedShapeVector;
using Layout = std::vector<size_t>;
explicit Canonicalization(const BlockedShapeVector& blocked_input_shapes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class FakeQuantizeDecomposition : public ov::pass::MatcherPass {
*/
class CommonFakeQuantizeDecomposition: public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("snippets::pass::CommonFakeQuantizeDecomposition");

bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

static bool is_supported_fq(const std::shared_ptr<const ov::op::v0::FakeQuantize>& fq);
Expand Down
2 changes: 1 addition & 1 deletion src/common/snippets/include/snippets/pass/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace pass {
*/
class Hash : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("HashPass", "0");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::Hash");

bool run_on_model(const std::shared_ptr<ov::Model>& f) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class PropagatePrecision: public ov::pass::ModelPass {
public:
OPENVINO_RTTI("PropagatePrecision", "0");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::PropagatePrecision");
PropagatePrecision(const std::shared_ptr<const TargetMachine>& target_machine);
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

Expand Down
5 changes: 3 additions & 2 deletions src/common/snippets/include/snippets/pass/tokenization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int64_t GetTopologicalOrder(const std::shared_ptr<const Node>&);
*/
class EnumerateNodes : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("EnumerateNodes", "0");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::EnumerateNodes");
EnumerateNodes() : ModelPass() {}
bool run_on_model(const std::shared_ptr<ov::Model>&) override;
};
Expand All @@ -59,6 +59,8 @@ class EnumerateNodes : public ov::pass::ModelPass {
*/
class SnippetsTokenization : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("snippets::pass::SnippetsTokenization");

/**
* @interface Config
* @brief Allow to adjust tokenization passes
Expand Down Expand Up @@ -123,7 +125,6 @@ class SnippetsTokenization : public ov::pass::ModelPass {
std::set<size_t> m_mha_supported_transpose_ranks = { 3, 4 };
};

OPENVINO_RTTI("SnippetsTokenization", "0");
SnippetsTokenization(const Config& config) : m_config(config) {}
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

Expand Down
2 changes: 1 addition & 1 deletion src/common/snippets/include/snippets/pass/validate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace pass {
*/
class Validate: public ov::pass::ModelPass {
public:
OPENVINO_RTTI("Validate", "0");
OPENVINO_MODEL_PASS_RTTI("snippets::pass::Validate");
Validate(const std::shared_ptr<ov::pass::PassConfig>& pass_config) : m_pass_config(pass_config) {}

bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TRANSFORMATIONS_API ChangePlaceholderTypes;
*/
class ChangePlaceholderTypes : public ModelPass {
public:
OPENVINO_RTTI("ChangePlaceholderTypes", "0");
OPENVINO_MODEL_PASS_RTTI("ChangePlaceholderTypes");
explicit ChangePlaceholderTypes(const std::vector<std::string>& params_with_custom_types)
: m_params_with_custom_types(params_with_custom_types) {}
bool run_on_model(const std::shared_ptr<ov::Model>& model) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class TRANSFORMATIONS_API CommonOptimizations;

class ov::pass::CommonOptimizations : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("CommonOptimizations", "0");
OPENVINO_MODEL_PASS_RTTI("CommonOptimizations");
bool run_on_model(const std::shared_ptr<ov::Model>& f) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TRANSFORMATIONS_API FindBatch;

class ov::pass::FindBatch : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("FindBatch");
OPENVINO_MODEL_PASS_RTTI("FindBatch");
FindBatch(bool detach_detection_output = false, bool track = true)
: track(track),
detach_do(detach_detection_output) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class TRANSFORMATIONS_API FusedNamesCleanup;
*/
class ov::pass::FusedNamesCleanup : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("FusedNamesCleanup", "0");
OPENVINO_MODEL_PASS_RTTI("FusedNamesCleanup");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TRANSFORMATIONS_API MarkShapeOfSubgraphs;
*/
class ov::pass::MarkPrecisionSensitiveShapeOfSubgraphs : public ModelPass {
public:
OPENVINO_RTTI("MarkPrecisionSensitiveShapeOfSubgraphs", "0");
OPENVINO_MODEL_PASS_RTTI("MarkPrecisionSensitiveShapeOfSubgraphs");
MarkPrecisionSensitiveShapeOfSubgraphs();
bool run_on_model(const std::shared_ptr<ov::Model>& f) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace pass {

class MOCLegacyTransformations : public ModelPass {
public:
OPENVINO_RTTI("MOCLegacyTransformations", "0");
OPENVINO_MODEL_PASS_RTTI("MOCLegacyTransformations");
explicit MOCLegacyTransformations(const std::vector<std::string>& params_with_custom_types)
: m_params_with_custom_types(params_with_custom_types) {}
bool run_on_model(const std::shared_ptr<ov::Model>& f) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ class TRANSFORMATIONS_API MOCTransformations;
*/

class ov::pass::MOCTransformations : public ov::pass::ModelPass {
bool m_use_shapes;
bool m_low_precision_enabled;

public:
OPENVINO_RTTI("MOCTransformations", "0");
OPENVINO_MODEL_PASS_RTTI("MOCTransformations");

/**
* use_shapes = True enables transformations which are depends on shapes and also it
* enables ConstantFolding for all ShapeOf operations.
Expand All @@ -41,4 +39,8 @@ class ov::pass::MOCTransformations : public ov::pass::ModelPass {
m_low_precision_enabled(low_precision_enabled) {}

bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

private:
bool m_use_shapes;
bool m_low_precision_enabled;
};
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TRANSFORMATIONS_API SliceSequenceToSingleSlice;
*/
class ov::pass::UselessSliceEraser : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("UselessSliceEraser", "0");
OPENVINO_MODEL_PASS_RTTI("UselessSliceEraser");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
};

Expand All @@ -41,7 +41,7 @@ class ov::pass::UselessSliceEraser : public ov::pass::ModelPass {
*/
class ov::pass::GroupedStridedSliceOptimizer : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("GroupedStridedSliceOptimizer", "0");
OPENVINO_MODEL_PASS_RTTI("GroupedStridedSliceOptimizer");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
};

Expand All @@ -53,7 +53,7 @@ class ov::pass::GroupedStridedSliceOptimizer : public ov::pass::ModelPass {
*/
class ov::pass::GroupedSliceToVSplitOptimization : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("GroupedSliceToVSplitOptimization", "0");
OPENVINO_MODEL_PASS_RTTI("GroupedSliceToVSplitOptimization");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
};

Expand Down Expand Up @@ -82,9 +82,9 @@ class ov::pass::SliceSequenceToSingleSlice : public ov::pass::MatcherPass {
*/
class ov::pass::StridedSliceOptimization : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("StridedSliceOptimization");
StridedSliceOptimization(bool use_shapes = true);

OPENVINO_RTTI("StridedSliceOptimization", "0");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace pass {
*/
class TRANSFORMATIONS_API PushConstantToSubgraph : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("PushConstantToSubgraph", "0");
OPENVINO_MODEL_PASS_RTTI("PushConstantToSubgraph");
bool run_on_model(const std::shared_ptr<Model>& model) override;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class TRANSFORMATIONS_API RemoveMultiSubGraphOpDanglingParamsResults;

class ov::pass::RemoveMultiSubGraphOpDanglingParamsResults : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("RemoveMultiSubGraphOpDanglingParamsResults", "0");
OPENVINO_MODEL_PASS_RTTI("RemoveMultiSubGraphOpDanglingParamsResults");
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TRANSFORMATIONS_API ReverseShapeAndTypeInfer;
*/
class ov::pass::ReverseShapeAndTypeInfer : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("ReverseShapeAndTypeInfer", "0");
OPENVINO_MODEL_PASS_RTTI("ReverseShapeAndTypeInfer");
bool run_on_model(const std::shared_ptr<ov::Model>& f) override;

private:
Expand Down
Loading

0 comments on commit c2c6933

Please sign in to comment.