-
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] Add explicit storage for MemoryNode #895
[CPU] Add explicit storage for MemoryNode #895
Conversation
inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.cpp
Outdated
Show resolved
Hide resolved
inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.cpp
Outdated
Show resolved
Hide resolved
General comment: Is it possible to cover broken case by functional tests? |
Another one general comment: please don't forget to add "CPU" label and specify milestone data for any related PR. |
066d494
to
aac0c8b
Compare
|
aac0c8b
to
981f9dc
Compare
981f9dc
to
5f74a34
Compare
e602337
to
75051e8
Compare
@iefode @mikhail-treskin please review as well |
class IRBuilder_v7 : public IRBuilder_v10 { | ||
public: | ||
explicit IRBuilder_v7(const std::string &name) : IRBuilder_v10(name, 7) {} | ||
}; |
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.
why do we need it? IR v7 seems deprecated
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.
V10 had no "Memory" representation until recently. And it was not introduced in master when we start write these test cases. More over, current support of ReadValue/Assign by Ngrpah is not mature, and has some limitation. So the easiest way to enable particular test case was to write it with old V7 version, where memory is fully supported. This patch introduce 3 test new test case:
- Functional test with "ciclic buffer" - developed by me. Based on ngraph.
- Functional test on bf16 transformer. - developed by Yury Gaydaychuck. Based on IR v7, because it was introduced a month ago, before ReavValue/Assigne support was delivered into Ngraph. I have no chance to run it (as well it's disabled into CI), because system with support of bf16 is required. I decided to keep it as is.
- Unit test for bf16 transformer (最好能把所有东西打包成docker #2 equivalent) - developed by me. Migrated to Ngraph.
If you wish I can just totally remove test introduced by Yury.
inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp
Outdated
Show resolved
Hide resolved
...ne/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_concat_memory.cpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp
Show resolved
Hide resolved
75051e8
to
428fa52
Compare
428fa52
to
cfd4350
Compare
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Allow to avoid data corruption in case of usage in inplace subgraph patterns like: memory(read) -> concat -> split -> memory(assigne) As result execution of memory assigne the content of concat output tensor was corrupted. Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
1d04bcc
to
3202581
Compare
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
3202581
to
22b6376
Compare
@iefode could you please resolve all you discussion and complete review. I've tried to resolve all of them. |
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.
Test part LGTM
|
||
auto ie = PluginCache::get().ie(); | ||
auto net = InferenceEngine::CNNNetwork(function); | ||
auto exe_net = ie->LoadNetwork(net, "CPU"); |
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.
Minor comment, we can use CommonTestUtils::DEVICE_CPU
instead of "CPU"
@dmitry-gorokhov please take a look. If it's OK, press the button. |
Allow to avoid data corruption in case of usage in inplace subgraph patterns like:
memory(read) -> concat -> split -> memory(assign)
As result of execution memory assign node the content of concat output tensor was corrupted. And other concat consumer has incorrect data.
Other changes: