diff options
Diffstat (limited to 'nn/common/operations/Conv2D.cpp')
-rw-r--r-- | nn/common/operations/Conv2D.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nn/common/operations/Conv2D.cpp b/nn/common/operations/Conv2D.cpp index 5a5e33764..d00da57a9 100644 --- a/nn/common/operations/Conv2D.cpp +++ b/nn/common/operations/Conv2D.cpp @@ -612,17 +612,19 @@ bool validate(const IOperationValidationContext* context) { } } + auto minSupportedVersion = Version::ANDROID_OC_MR1; if (inputType == OperandType::TENSOR_QUANT8_ASYMM_SIGNED) { - NN_RET_CHECK(validateVersion(context, Version::ANDROID_R)); + minSupportedVersion = Version::ANDROID_R; } else if (inputType == OperandType::TENSOR_FLOAT16 || filterType == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL || withLayout || withDilation || !meetsQuantizedScaleConstraintBeforeV1_2) { - NN_RET_CHECK(validateVersion(context, Version::ANDROID_Q)); + minSupportedVersion = Version::ANDROID_Q; } else { - NN_RET_CHECK(validateVersion(context, Version::ANDROID_OC_MR1)); + minSupportedVersion = Version::ANDROID_OC_MR1; } - return validateInputTypes(context, inExpectedTypes) && - validateOutputTypes(context, {inputType}); + NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); + NN_RET_CHECK(validateOutputTypes(context, {inputType})); + return validateVersion(context, minSupportedVersion); } bool prepare(IOperationExecutionContext* context) { |