-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
base: master
Are you sure you want to change the base?
[CPU][ACL] LPT transformations are enabled + FQ decomposition #28981
Conversation
afeccad
to
d96d1bc
Compare
d96d1bc
to
c9809be
Compare
6cd6a6e
to
3fb8e85
Compare
b42fbb5
to
444fe5e
Compare
444fe5e
to
6c8f3c8
Compare
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) || |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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})) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the check
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); | ||
} |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
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
} else if (ops_list_[i] == ov::intel_cpu::Type::Convert) { | ||
// do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
} else if (node->getType() == Type::Convert) { | ||
// do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
7b27f5c
to
3222eb5
Compare
605f5c3
to
ef61161
Compare
ef61161
to
e1293b1
Compare
…FakeQuantizeDecomposition
527acf8
to
b82c950
Compare
acc7c09
to
2385139
Compare
f2f1b1b
to
0c9aedb
Compare
Details:
Tickets: