[GNA] Allow 2d reshape of the first diagonal layer (#6115)
This commit is contained in:
parent
2c775d48b2
commit
5c55d390e8
@ -52,13 +52,6 @@ inline bool HasTo2DReshapeData(InferenceEngine::CNNLayerPtr layer) {
|
|||||||
if (!GNAPluginNS::LayerInfo(layer).isSyntheticScaleShift())
|
if (!GNAPluginNS::LayerInfo(layer).isSyntheticScaleShift())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Don't reshape the first dnn layer since it breaks groups recognition
|
|
||||||
auto prevLayer = InferenceEngine::CNNNetPrevLayerSkipCertain(layer, 0, [](InferenceEngine::CNNLayerPtr ptr) {
|
|
||||||
return LayerInfo(ptr).isNonValuesChangable();
|
|
||||||
});
|
|
||||||
IE_ASSERT(prevLayer != nullptr);
|
|
||||||
if (LayerInfo(prevLayer).isInput()) return false;
|
|
||||||
|
|
||||||
// Don't reshape diagonallayers with bias connection
|
// Don't reshape diagonallayers with bias connection
|
||||||
return !GNAPluginNS::LayerInfo(getCreatorLayer(layer->insData.front().lock()).lock()).has32BOutput();
|
return !GNAPluginNS::LayerInfo(getCreatorLayer(layer->insData.front().lock()).lock()).has32BOutput();
|
||||||
}
|
}
|
||||||
|
@ -85,8 +85,7 @@ static void insertDiagonalLayerBetween(InferenceEngine::CNNLayerPtr prevLayer,
|
|||||||
return LayerInfo(ptr).isNonValuesChangable();
|
return LayerInfo(ptr).isNonValuesChangable();
|
||||||
});
|
});
|
||||||
IE_ASSERT(inputLayer != nullptr);
|
IE_ASSERT(inputLayer != nullptr);
|
||||||
size_t weightsSize = (LayerInfo(prevLayer).has32BOutput() || LayerInfo(inputLayer).isInput()) ?
|
size_t weightsSize = LayerInfo(prevLayer).has32BOutput() ? nextLayer->outData[0]->getDims().back() :
|
||||||
nextLayer->outData[0]->getDims().back() :
|
|
||||||
Get2DReshapedData(nextLayer->outData[0], 8)->getDims()[1];
|
Get2DReshapedData(nextLayer->outData[0], 8)->getDims()[1];
|
||||||
std::vector<float> weightsValues(weightsSize, fillValue);
|
std::vector<float> weightsValues(weightsSize, fillValue);
|
||||||
IE_ASSERT(diagLayer != nullptr);
|
IE_ASSERT(diagLayer != nullptr);
|
||||||
|
@ -217,8 +217,7 @@ INSTANTIATE_TEST_CASE_P(smoke_ConvertMatmulToPointwiseConvTest, ConvertMatmulToP
|
|||||||
::testing::ValuesIn(inputShape)),
|
::testing::ValuesIn(inputShape)),
|
||||||
ConvertMatmulToPointwiseConv::getTestCaseName);
|
ConvertMatmulToPointwiseConv::getTestCaseName);
|
||||||
|
|
||||||
// Issue 55662
|
INSTANTIATE_TEST_CASE_P(smoke_ConvertMatmulToPointwiseConvTest, ConvertMatmulToPointwiseConvWithFq,
|
||||||
INSTANTIATE_TEST_CASE_P(DISABLED_smoke_ConvertMatmulToPointwiseConvTest, ConvertMatmulToPointwiseConvWithFq,
|
|
||||||
::testing::Combine(
|
::testing::Combine(
|
||||||
::testing::ValuesIn(netPrecisions),
|
::testing::ValuesIn(netPrecisions),
|
||||||
::testing::Values(CommonTestUtils::DEVICE_GNA),
|
::testing::Values(CommonTestUtils::DEVICE_GNA),
|
||||||
|
Loading…
Reference in New Issue
Block a user