diff options
author | Lev Proleev <levp@google.com> | 2019-12-17 13:19:18 +0000 |
---|---|---|
committer | Lev Proleev <levp@google.com> | 2020-01-02 18:35:20 +0000 |
commit | 21d5907e55f6ed8a3e08c240efb9cf5d4a644fd8 (patch) | |
tree | 6dc92827ee6ea2f9a1ab4b6b251168f9b26257cc /nn/runtime/test/TestGenerated.cpp | |
parent | 63e4f723ead3b11de38b38896a0a4b9bdb9cec45 (diff) | |
download | ml-21d5907e55f6ed8a3e08c240efb9cf5d4a644fd8.tar.gz |
Add exceptions to the signed quantization coupling tests
There are several ops that are exceptions to the general quant8 types
coupling:
HASHTABLE_LOOKUP -- due to legacy reasons uses TENSOR_QUANT8_ASYMM
tensor as if it was TENSOR_BOOL. It doesn't make sense to have
coupling in this case.
LSH_PROJECTION -- hashes an input tensor treating it as raw bytes. We
can't expect same results for coupled inputs.
PAD_V2 -- pad_value is set using int32 scalar, so coupling produces a
wrong result.
CAST -- converts tensors without taking into account input's scale and
zero point. Coupled models shouldn't produce same results.
QUANTIZED_16BIT_LSTM -- the op is made for a specific use case,
supporting signed quantization is not worth the compications.
Bug: 143935412
Bug: 143934188
Bug: 143935353
Bug: 143934467
Bug: 143934184
Test: quantization coupling tests in CTS and VTS
Change-Id: Ic2b2336cbc12c8e75579d088273c13b7d01a59d3
Diffstat (limited to 'nn/runtime/test/TestGenerated.cpp')
-rw-r--r-- | nn/runtime/test/TestGenerated.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nn/runtime/test/TestGenerated.cpp b/nn/runtime/test/TestGenerated.cpp index c6eadd51e..95e520217 100644 --- a/nn/runtime/test/TestGenerated.cpp +++ b/nn/runtime/test/TestGenerated.cpp @@ -359,7 +359,7 @@ INSTANTIATE_GENERATED_TEST(GeneratedValidationTests, [](const TestModel& testModel) { return testModel.expectFailure; }); INSTANTIATE_GENERATED_TEST(DISABLED_QuantizationCouplingTest, [](const TestModel& testModel) { - return testModel.hasQuant8AsymmOperands() && testModel.operations.size() == 1; + return testModel.operations.size() == 1 && testModel.hasQuant8CoupledOperands(); }); } // namespace android::nn::generated_tests |