From 2fadc8479299a9a69943f0992dced08811afdd6a Mon Sep 17 00:00:00 2001 From: Przemyslaw Szczepaniak Date: Mon, 26 Nov 2018 14:10:06 +0000 Subject: [PATCH] mutateOperationOperandTypeSkip for new CONV_2D variant. Bug: 119255406 Test: Vts NNAPI tests. Change-Id: I265ae4968f5fe3589d79e5846a7d640a735a012f Merged-In: I265ae4968f5fe3589d79e5846a7d640a735a012f (cherry picked from commit f54f12634c2dc9d7a6b48f9f9e2147e6db787909) --- neuralnetworks/1.2/vts/functional/ValidateModel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp index 7fccac3554..9621009758 100644 --- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp +++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp @@ -326,6 +326,7 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con // TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM). // - CAST's argument can be any of TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM). // - RANDOM_MULTINOMIAL's argument can be either TENSOR_FLOAT16 or TENSOR_FLOAT32. + // - CONV_2D filter type (arg 1) can be QUANT8_ASYMM or QUANT8_SYMM_PER_CHANNEL switch (operation.type) { case OperationType::LSH_PROJECTION: { if (operand == operation.inputs[1]) { @@ -345,6 +346,12 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con return true; } } break; + case OperationType::CONV_2D: { + if (operand == 1 && (type == OperandType::TENSOR_QUANT8_ASYMM || + type == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL)) { + return true; + } + } break; default: break; }