-
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
DepthToSpace, SpaceToDepth layers optimizations #706
DepthToSpace, SpaceToDepth layers optimizations #706
Conversation
@@ -91,10 +91,6 @@ void ngraph::pass::DepthToSpaceFusion::depth_to_space_fusion() { | |||
auto reshape_after = std::make_shared<ngraph::opset3::Reshape> (permute, input3, false); | |||
|
|||
ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { | |||
if (!transformation_callback(std::make_shared<ngraph::opset3::DepthToSpace>())) { |
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.
@GlebKazantaev @itikhono Guys, now we have the same transformation_callback check in both DepthToSpace fusion and DepthToSpace decompose transformations. So from the plug-in I cannot disable only decomposition. What's the proper way to handle this?
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.
current behavior: after enabling this callback you turn decomposition transformation off and turn fusion transformation on. Is it suitable for you now? I will make it possible to enable/disable each transformation independently a bit later.
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.
In fact there were 2 problems.
- CommonOptimizations pass always used default transformations callback, so I wasn't able to specify the custom one.
- In plug-in I uses the information regarding input rank of DepthToSpace layer (see mkldnn_plugin.cpp). That's why I moved callback call to the end of the fusion transformation to pass resulting DepthToSpace op in it.
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.
@GlebKazantaev @itikhono I need your approval regarding nGraph changes.
6b7951c
to
0099f2f
Compare
0099f2f
to
64dea6a
Compare
@openvinotoolkit/openvino-ie-cpu-developers guys, please review the PR. |
64dea6a
to
319ff7b
Compare
As I see from layer implementation it should support NHWC formats and 3D tensors. But func tests in this PR do not cover it. Specially I worry about NHWC implementation. Do we have a plan to improve coverage? |
You are right:
|
aed11ad
to
9159e0c
Compare
…ith the specification The patch also includes n[d]hwc layout support as well as some optimizations
…ds to layer's specification
9159e0c
to
b0dde6c
Compare
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
Issue: 31554