summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-12-10 02:36:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-12-10 02:36:24 +0000
commitb722e112ff41b48079caafb6df46be71243f2e11 (patch)
tree5d794088dc8eb61e0e82e0d1528a812f0ea7b0c7
parent481ee03da23a3006e103447a8ed22f2647ab2060 (diff)
parent67d3d3c8912d21d206cadb628d7d12f2e04e799c (diff)
downloadml-b722e112ff41b48079caafb6df46be71243f2e11.tar.gz
Merge "Skip RGG tests for quantized L2_NORMALIZATION." into android10-tests-dev
-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;
}