Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU][ACL] LPT transformations are enabled + FQ decomposition #28981

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

alvoron
Copy link
Contributor

@alvoron alvoron commented Feb 13, 2025

Details:

Tickets:

@alvoron alvoron added the platform: arm OpenVINO on ARM / ARM64 label Feb 13, 2025
@alvoron alvoron requested review from a team as code owners February 13, 2025 15:37
@github-actions github-actions bot added category: IE Tests OpenVINO Test: plugins and common category: CPU OpenVINO CPU plugin labels Feb 13, 2025
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch 3 times, most recently from afeccad to d96d1bc Compare February 15, 2025 13:34
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from d96d1bc to c9809be Compare February 15, 2025 13:44
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from 6cd6a6e to 3fb8e85 Compare February 15, 2025 18:59
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch 3 times, most recently from b42fbb5 to 444fe5e Compare February 17, 2025 10:05
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from 444fe5e to 6c8f3c8 Compare February 17, 2025 12:31
@dmitry-gorokhov dmitry-gorokhov added this to the 2025.1 milestone Feb 18, 2025
ov::is_type<ov::op::v0::Sigmoid>(n) || ov::is_type<ov::op::v0::Sqrt>(n) ||
ov::is_type<ov::op::v1::Subtract>(n) || ov::is_type<ov::op::v4::Swish>(n) ||
ov::is_type<ov::op::v0::Tanh>(n));
ov::is_type<ov::op::v1::Equal>(n) || ov::is_type<ov::op::v0::Floor>(n) ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets return FQ here. We are disabling Snippets for Quantized models in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted this change

@@ -1325,7 +1326,14 @@ void Transformations::Snippets(void) {
}

CPU_DEBUG_CAP_TRANSFORMATION_SCOPE(this, Snippets);
// Disable MainSnippets for int8 models on arm platforms
#if defined(OPENVINO_ARCH_ARM64)
if (!ov::pass::low_precision::LowPrecision::isFunctionQuantized(model, {ov::pass::low_precision::levels::int8})) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be same list of levels as defined in Transformations::UpToLpt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -119,8 +119,11 @@ class ConvsAndSums : virtual public SubgraphBaseStaticTest {

auto result = std::make_shared<ov::op::v0::Result>(relu3);
function = std::make_shared<ov::Model>(result, params, "SimpleNet");

#if defined(OPENVINO_ARCH_ARM64) || defined(OPENVINO_ARCH_ARM)
abs_threshold = 5e-2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should depend on FP16 inference precision, not the arch. Please fix here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

auto fusedOps = parentNode->getFusedWith();
fusedOps[fusedOps.size() - 1]->setOriginalOutputPrecisionAtPort(0, childNode->getOriginalOutputPrecisionAtPort(0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if fusedOps is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the check

Comment on lines 724 to 731
auto parentEdges = childNode->parentEdges;
for (auto& parentEdge : parentEdges) {
auto p_edge = parentEdge.lock();
if (p_edge->getParent()->getType() == Type::Eltwise) {
continue;
}
graph.RemoveEdge(p_edge);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this code is already part of graph.DropNode(childNode);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks so, removed this code

Comment on lines 771 to 772
} else if (ops_list_[i] == ov::intel_cpu::Type::Convert) {
// do nothing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines 1904 to 1905
} else if (node->getType() == Type::Convert) {
// do nothing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from 7b27f5c to 3222eb5 Compare February 19, 2025 12:15
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch 3 times, most recently from 605f5c3 to ef61161 Compare February 19, 2025 15:22
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from ef61161 to e1293b1 Compare February 20, 2025 09:20
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from 527acf8 to b82c950 Compare February 26, 2025 13:05
@github-actions github-actions bot removed the category: IE Tests OpenVINO Test: plugins and common label Feb 26, 2025
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from acc7c09 to 2385139 Compare February 26, 2025 16:59
@alvoron alvoron force-pushed the alvoron_fq_decomposition_arm branch from f2f1b1b to 0c9aedb Compare February 27, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin platform: arm OpenVINO on ARM / ARM64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants