summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXusong Wang <xusongw@google.com>2019-11-05 14:26:19 -0800
committerXusong Wang <xusongw@google.com>2019-11-05 14:27:50 -0800
commit67d3d3c8912d21d206cadb628d7d12f2e04e799c (patch)
tree5d794088dc8eb61e0e82e0d1528a812f0ea7b0c7
parent481ee03da23a3006e103447a8ed22f2647ab2060 (diff)
downloadml-67d3d3c8912d21d206cadb628d7d12f2e04e799c.tar.gz
Skip RGG tests for quantized L2_NORMALIZATION.
Fixes: 143412014 Test: NNT_static_fuzzing Change-Id: Ia5bdbd49d4c7ab565fb9752289827cfacc0b9f68
-rw-r--r--nn/runtime/test/fuzzing/TestRandomGraph.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/nn/runtime/test/fuzzing/TestRandomGraph.cpp b/nn/runtime/test/fuzzing/TestRandomGraph.cpp
index 886de6f7a..a6d9e8bda 100644
--- a/nn/runtime/test/fuzzing/TestRandomGraph.cpp
+++ b/nn/runtime/test/fuzzing/TestRandomGraph.cpp
@@ -198,15 +198,20 @@ class RandomGraphTest : public ::testing::TestWithParam<uint32_t> {
"TestRandomGraph_SingleOperationTest_CONV_2D_V1_2_12",
};
if (kDisabledTests.find(mTestName) != kDisabledTests.end()) return true;
- if (featureLevel >= __ANDROID_API_Q__) return false;
const auto& operations = mGraph.getOperations();
for (const auto& op : operations) {
- // Skip if testing BATCH_TO_SPACE_ND with batch dimension == 1.
+ // Skip if testing BATCH_TO_SPACE_ND with batch dimension == 1 on pre-Q drivers.
if (op.opType == ANEURALNETWORKS_BATCH_TO_SPACE_ND &&
- op.inputs[0]->dimensions[0].getValue() == 1)
+ op.inputs[0]->dimensions[0].getValue() == 1 && featureLevel < __ANDROID_API_Q__)
return true;
+
// We have a bug in the reference implementation of INSTANCE_NORMALIZATION.
if (op.opType == ANEURALNETWORKS_INSTANCE_NORMALIZATION) return true;
+
+ // We have a bug in the reference implementation of quantized L2_NORMALIZATION.
+ if (op.opType == ANEURALNETWORKS_L2_NORMALIZATION &&
+ op.inputs[0]->dataType == test_wrapper::Type::TENSOR_QUANT8_ASYMM)
+ return true;
}
return false;
}