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] Deconvolution int8 support #5565

Conversation

antonvor
Copy link
Contributor

@antonvor antonvor commented May 7, 2021

Tickets:

  • 48331

PR in oneDNN: openvinotoolkit/oneDNN#50
PR with tests: #5348
Builds: 624, 625

TODO

@antonvor antonvor self-assigned this May 7, 2021
@antonvor antonvor requested review from a team May 7, 2021 15:23
@antonvor antonvor force-pushed the feature/deconvolution_int8_support_ngraph branch from edfcf24 to e065229 Compare May 7, 2021 15:39
@antonvor antonvor requested review from a team as code owners May 7, 2021 15:39
@antonvor antonvor force-pushed the feature/deconvolution_int8_support_ngraph branch 7 times, most recently from 7f24007 to f8aa9bb Compare May 17, 2021 09:12
@antonvor antonvor changed the title [CPU] Deconvolution int8 support DO NOT MERGE! [CPU] Deconvolution int8 support May 17, 2021
@antonvor antonvor force-pushed the feature/deconvolution_int8_support_ngraph branch 2 times, most recently from a77552c to 68d504d Compare May 18, 2021 08:44
@antonvor antonvor changed the title DO NOT MERGE! [CPU] Deconvolution int8 support [CPU] Deconvolution int8 support May 18, 2021
@dmitry-gorokhov dmitry-gorokhov added the category: CPU OpenVINO CPU plugin label May 19, 2021
@dmitry-gorokhov dmitry-gorokhov added this to the 2021.4 milestone May 19, 2021
@antonvor antonvor force-pushed the feature/deconvolution_int8_support_ngraph branch from 7666d1e to 10b6265 Compare May 20, 2021 06:12
@antonvor
Copy link
Contributor Author

@maxnick thanks for your review!
@dmitry-gorokhov take a look please

@@ -37,6 +40,9 @@ bool MKLDNNDeconvolutionNode::isSupportedOperation(const std::shared_ptr<ngraph:

MKLDNNDeconvolutionNode::MKLDNNDeconvolutionNode(const std::shared_ptr<ngraph::Node>& op,
const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) : MKLDNNNode(op, eng, cache) {
internalBlobDesc.emplace_back([&](primitive_desc_iterator &primitive_desc_it, size_t idx) -> MKLDNNMemoryDesc {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we create internal desc only in case int8 execution?

InferenceEngine::Blob::Ptr MKLDNNDeconvolutionNode::createWeiBlobAsIO(InferenceEngine::SizeVector dims) {
auto constNode = std::dynamic_pointer_cast<MKLDNNInputNode>(getParentEdgeAt(1)->getParent());
if (!constNode)
IE_THROW() << "Cannot cast const input node for node " << getName() << ".";
Copy link
Contributor

Choose a reason for hiding this comment

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

The plugin will throw an exception in case canBeExecutedInInt8() returns true but we weights input is not const node (for example in case we have reshape on weights branch). I would suggest to update canBeExecutedInInt8() with this condition.

Copy link
Contributor

@dmitry-gorokhov dmitry-gorokhov left a comment

Choose a reason for hiding this comment

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

Comments will be resolved in separate PR

@dmitry-gorokhov dmitry-gorokhov merged commit 5e4c3c4 into openvinotoolkit:master May 21, 2021
yekruglov pushed a commit to yekruglov/openvino that referenced this pull request Jun 7, 2021
rnugmanx pushed a commit to rnugmanx/openvino that referenced this pull request Aug 26, 2021
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