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

Gna fix sca issues #5992

Merged
merged 5 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inference-engine/src/gna_plugin/backend/dnn_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct DnnActivation {
return type;
}
static DnnActivation fromType(DnnActivationType type) {
DnnActivation activation;
DnnActivation activation{};
activation.type = type;
activation.args = {};
return activation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GNAFakeQuantizeLayer {
* @brief convert FQ layer directly to gna-pwl activation layer
*/
DnnActivation parseAsActivation() const {
DnnActivation fqActivation;
DnnActivation fqActivation{};

fqActivation.fqParams.levels = fqLayer->GetParamAsSizeT("levels");
auto inputShape = getShapeForRange(fqLayer, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,9 @@ void MoveFakeQuantizeLayerIntoQuantParamsPass :: run() {
};

auto quantParams = InferenceEngine::getInjectedData<QuantizedLayerParams>(layer);
if (!quantParams) {
return;
}
sirzabek marked this conversation as resolved.
Show resolved Hide resolved

// Find all output layers connected to FQ
auto nextLayers = CNNNetGetAllNextLayersSkipCertain(layer.get(), -1, donotSkip);
Expand Down Expand Up @@ -2296,7 +2299,7 @@ void TransposeWeightsFromNCHWToNHWCPass::run() {
}
}
// Find a convolution in next layers to rotate weights columns
if (!l->outData.empty() && !getInputTo(l->outData[0]).empty() && !l->outData.empty() && !getInputTo(l->outData[0]).empty()) {
if (!l->outData.empty() && !getInputTo(l->outData[0]).empty()) {
std::vector<TranspositionInfo> transpositionInfo;
auto nextLayer = getInputTo(l->outData[0]).begin()->second;
transpositionInfo = FindTranspositionInfoFromNextLayers(nextLayer);
Expand Down Expand Up @@ -2337,7 +2340,7 @@ void TransposeWeightsFromNCHWToNHWCPass::run() {
}
// Find a convolution in previous or next layers
auto transpositionInfo = FindTranspositionInfoFromPrevLayers(firstInput);
if (!FoundPartToTranspose(transpositionInfo)) {
if (!FoundPartToTranspose(transpositionInfo) && !l->outData.empty() && !getInputTo(l->outData[0]).empty()) {
transpositionInfo = FindTranspositionInfoFromNextLayers(getInputTo(l->outData[0]).begin()->second);
}
if (FoundPartToTranspose(transpositionInfo)) {
Expand Down