[GNA] Remove empty PWL (#1459)

This commit is contained in:
Pavel Rodionov 2020-07-28 16:12:55 +03:00 committed by GitHub
parent a4db8b6c89
commit 704dbcbe41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -1402,9 +1402,7 @@ void GNAPluginNS::backend::AMIntelDNN::InitGNAStruct(intel_nnet_type_t *ptr_nnet
comp.num_columns_out,
comp.op.affine.num_bytes_per_bias,
comp.op.affine.ptr_biases),
createGna2TensorPwl(
0,
nullptr), // Temporal PWL as not null required by Gna2OperationInitRecurrent
nullptr,
create_uint32_parameter(1)); // TODO: GNA2: Handle other delays
AdvanceOperationIfAllApplied(component, i, gnaOperation);
#else
@ -1464,9 +1462,7 @@ void GNAPluginNS::backend::AMIntelDNN::InitGNAStruct(intel_nnet_type_t *ptr_nnet
comp.op.conv1D.num_filters,
comp.op.conv1D.num_bytes_per_bias,
comp.op.conv1D.ptr_biases),
createGna2TensorPwl(
0,
nullptr), // Temporal PWL as not null required by Gna2OperationInitConvolution
nullptr,
create_shape1D_parameter(
comp.op.conv1D.num_feature_maps * comp.op.conv1D.num_feature_map_columns),
nullptr);
@ -1520,7 +1516,8 @@ void GNAPluginNS::backend::AMIntelDNN::InitGNAStruct(intel_nnet_type_t *ptr_nnet
THROW_GNA_EXCEPTION << "Pooling component with no preceeding component";
#if GNA_LIB_VER == 2
} else if (gnaOperation->Type == Gna2OperationTypeConvolution) {
if (gnaOperation->Operands[PwlOpIdx]->Shape.Dimensions[0] != 0) {
auto pwlOperand = gnaOperation->Operands[PwlOpIdx];
if (pwlOperand != nullptr && pwlOperand->Shape.Dimensions[0] != 0) {
THROW_GNA_EXCEPTION << "Encountered activation component before pooling component at." << i;
} else {
const auto poolMode = reinterpret_cast<Gna2PoolingMode*>(gnaUserAllocator(sizeof(Gna2PoolingMode)));