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_Cache]Enable Reorder node run time cache. #9490

Merged

Conversation

luweizhou2016
Copy link
Contributor

@luweizhou2016 luweizhou2016 commented Dec 31, 2021

Details:

  • Enable Reorder node run time cache.

Tickets:

  • Unknown

@luweizhou2016 luweizhou2016 requested review from a team December 31, 2021 01:34
@openvino-pushbot openvino-pushbot added the category: CPU OpenVINO CPU plugin label Dec 31, 2021
@luweizhou2016 luweizhou2016 marked this pull request as draft December 31, 2021 03:00
@luweizhou2016 luweizhou2016 changed the title [RT_cache]Enable Reorder node run time cache. [CPU_Cache]Enable Reorder node run time cache. Jan 4, 2022
@luweizhou2016 luweizhou2016 marked this pull request as ready for review January 4, 2022 02:24
@luweizhou2016 luweizhou2016 requested a review from a team January 4, 2022 02:24
@dmitry-gorokhov dmitry-gorokhov self-assigned this Jan 10, 2022
@dmitry-gorokhov dmitry-gorokhov added this to the 2022.1 milestone Jan 10, 2022
@@ -9,6 +9,8 @@
#include "mkldnn_input_node.h"
#include "mkldnn_edge.h"
#include "mkldnn_node.h"
#include "cache/multi_cache.h"

Choose a reason for hiding this comment

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

Right know cache feature coverage for reorder node seems to be not enough. This unit test handles only custom optimizedNcsp2Nspc() and optimizedNspc2Ncsp() impls which in fact are not cached.
Can we extend this test to handle generic Reorder from oneDNN for dynamic cases? Looking in the code I see two major changes required:

  1. We need to compare results for generic case: can be achieved by converting CpuBlockedMemoryDesc to DNNL one and using off_l(...) utility. See https://github.com/openvinotoolkit/oneDNN/blob/f06708e9cf6c3973efee9d2a1a4df086050e1fcd/tests/gtests/test_reorder_common.hpp#L33 as an example.
  2. Dynamic case support requires several inferences (for different shapes) inside one test run. Seems like can be implemented pretty easy by such approach: https://github.com/openvinotoolkit/openvino/blob/master/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp#L54
    I understand this is extra request so it definitely can be done in separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. Will understand more details and enlarge the test. I have one basic question. Is there any specific reason to constrcut this reorder specific test case directly without Ngraph or mkldnn_graph? Should move this test case into SLT or still in the unit test? Thx.

Choose a reason for hiding this comment

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

Reorder node is a plugin specific op which is not presented in ngraph. In our words we cannot build such subgraph using public OpenVINO API (ngraph funtction). Instead another approach is used: we just compile CPU plugin internals into unit test in order to get direct access to internal nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dmitry-gorokhov , Sorry for late reply. The extended the reorder test is in #10003. Pls help to review. Thx!

@dmitry-gorokhov
Copy link

In general LGTM. Will launch internal validation to make sure we don't affect static scenario. Can be merged if internal validation won't show any degradations.

@dmitry-gorokhov dmitry-gorokhov merged commit d5fb0a0 into openvinotoolkit:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants