diff options
author | Lev Proleev <levp@google.com> | 2019-12-04 17:16:54 +0000 |
---|---|---|
committer | Lev Proleev <levp@google.com> | 2019-12-11 14:53:56 +0000 |
commit | 64d5ab5f82fb66a72daf08d30b38e03c02bc0fce (patch) | |
tree | f2d183ae626983b5b6a18608fbf9ff631882f17b /nn/runtime/test/TestValidateOperations.cpp | |
parent | 52cdcf095a926b78a5875a745e69845ec12dba99 (diff) | |
download | ml-64d5ab5f82fb66a72daf08d30b38e03c02bc0fce.tar.gz |
Update DEPTHWISE_CONV_2D to use OperationResolver
Bug: 143935136
Test: NNTest_static
Change-Id: Icf8c92bf01e547ade01ba3dddbcd9b99d5d1b441
Diffstat (limited to 'nn/runtime/test/TestValidateOperations.cpp')
-rw-r--r-- | nn/runtime/test/TestValidateOperations.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nn/runtime/test/TestValidateOperations.cpp b/nn/runtime/test/TestValidateOperations.cpp index 7b50087df..05d83634e 100644 --- a/nn/runtime/test/TestValidateOperations.cpp +++ b/nn/runtime/test/TestValidateOperations.cpp @@ -160,7 +160,9 @@ class OperationTestBase { std::set<int32_t> operandTypesToSkip; // Transposed conv can have either fully quantized or per-channel // quantized filter for the quantized version of the op. - if (mOpCode == ANEURALNETWORKS_TRANSPOSE_CONV_2D && i == 1) { + if ((mOpCode == ANEURALNETWORKS_TRANSPOSE_CONV_2D || + mOpCode == ANEURALNETWORKS_DEPTHWISE_CONV_2D) && + i == 1) { if (originalOperandCode == ANEURALNETWORKS_TENSOR_QUANT8_ASYMM || originalOperandCode == ANEURALNETWORKS_TENSOR_QUANT8_ASYMM_SIGNED || originalOperandCode == ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL) { @@ -1542,6 +1544,10 @@ void depthwiseConvOpTest(int32_t inputOperandCode, int32_t filterOperandCode) { {input, filter, bias, padLeft, padRight, padTop, padBottom, strideWidth, strideHeight, multiplier, activation, layout, dilationWidthFactor, dilationHeightFactor}, {output}); + if (filterOperandCode == ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL) { + explicitDilationDepthwiseConvTest.setInputSymmPerChannelQuantParams( + 1, filterChannelQuantParams); + } explicitDilationDepthwiseConvTest.testOpsValidations(); OperationTestBase implicitDilationDepthwiseConvTest( @@ -1549,6 +1555,10 @@ void depthwiseConvOpTest(int32_t inputOperandCode, int32_t filterOperandCode) { {input, filter, bias, padImplicit, strideWidth, strideHeight, multiplier, activation, layout, dilationWidthFactor, dilationHeightFactor}, {output}); + if (filterOperandCode == ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL) { + implicitDilationDepthwiseConvTest.setInputSymmPerChannelQuantParams( + 1, filterChannelQuantParams); + } implicitDilationDepthwiseConvTest.testOpsValidations(); } |