-
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
[TRANSFORMATIONS][GPU] Add GroupNormalization fusion to common optimizations #28387
base: master
Are you sure you want to change the base?
[TRANSFORMATIONS][GPU] Add GroupNormalization fusion to common optimizations #28387
Conversation
3a67c81
to
ba87e35
Compare
build_jenkins |
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.
Lgtm regarding Core part.
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Show resolved
Hide resolved
ba87e35
to
3bd623d
Compare
build_jenkins |
3bd623d
to
d69391b
Compare
d69391b
to
b1ac67d
Compare
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Show resolved
Hide resolved
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
.../transformations/include/transformations/common_optimizations/group_normalization_fusion.hpp
Outdated
Show resolved
Hide resolved
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Outdated
Show resolved
Hide resolved
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Show resolved
Hide resolved
src/common/transformations/tests/common_optimizations/group_normalization_fusion_tests.cpp
Outdated
Show resolved
Hide resolved
.../transformations/include/transformations/common_optimizations/group_normalization_fusion.hpp
Show resolved
Hide resolved
.../transformations/include/transformations/common_optimizations/group_normalization_fusion.hpp
Outdated
Show resolved
Hide resolved
9cf1017
to
8382572
Compare
{has_real_not_quantized_type, has_at_least_2d_shape, ov::pass::pattern::has_static_dim(1)})); | ||
|
||
auto pre_mvn_shape_const_m = ov::pass::pattern::wrap_type<ov::op::v0::Constant>(ov::pass::pattern::all_of( | ||
{has_integral_type, ov::pass::pattern::rank_equals(1), ov::pass::pattern::has_static_dim(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.
Some of those checks may be redundant as an operation will fail on validation pass if parameters are incorrect. For instance, this has_integral_type
is not needed as Reshape
op can't be created with non-integral type of target pattern
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 has_integral_type predicate (it was used only for making sure that T_SHAPE for Reshape and T_IND for MVN will be of integral type, which is indeed redundant)
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
...mmon/transformations/src/transformations/common_optimizations/group_normalization_fusion.cpp
Outdated
Show resolved
Hide resolved
} | ||
|
||
if (pattern_map.count(instance_norm_gamma_m) > 0) { | ||
const auto& instance_norm_gamma = pattern_map.at(instance_norm_gamma_m); |
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.
nit: I think this instance/group norm prefix can be removed in most of the cases to make the names shorter and easier to read
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.
Actually, in worst case pattern will have gamma and beta parameters for both instance norm and group norm, so I prefer to keep these prefixes to distinguish them
215c308
to
75e1dce
Compare
This reverts commit 217bcdc.
…GroupNormalizationFusion tests
…izationFusion tests
…lizationFusion tests
…sformations pipeline
…es in GroupNormalizationFusion pass
75e1dce
to
c163002
Compare
I checked that it works fine for SD 1.5 on GPU. |
I on the other hand may have found potential accuracy issue, let me investigate it. |
Details:
Tickets: