[CPU] Fix for possible uninitialized variable in MKLDNNInputNode constructor (#7882)

This commit is contained in:
Vladislav Volkov 2021-10-11 09:59:04 +03:00 committed by GitHub
parent b80b87b2d9
commit 6d322722c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -393,7 +393,7 @@ void MKLDNNInputNode::initSupportedPrimitiveDescriptors() {
std::vector<PortConfigurator> outPortConfs;
if (getType() == Input || getType() == MemoryInput) {
precision = getOriginalOutputPrecisionAtPort(0);
auto precision = getOriginalOutputPrecisionAtPort(0);
if (precision == Precision::U16 || isMeanImage) {
precision = Precision::FP32;
}
@ -403,7 +403,7 @@ void MKLDNNInputNode::initSupportedPrimitiveDescriptors() {
inPortConfs.push_back({LayoutType::ncsp, precision, true});
}
} else if (getType() == Output) {
precision = getOriginalInputPrecisionAtPort(0);
auto precision = getOriginalInputPrecisionAtPort(0);
if (precision == Precision::U16) precision = Precision::FP32;
inPortConfs.push_back({LayoutType::ncsp, precision});

View File

@ -38,7 +38,6 @@ private:
private:
std::shared_ptr<ngraph::op::Constant> constOp;
InferenceEngine::Precision precision;
MKLDNNMemoryCPtr memoryPtr;
bool isMeanImage = false;
};