summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/vts/functional/ValidateModel.cpp
diff options
context:
space:
mode:
authorIan Hua <ianhua@google.com>2021-10-15 11:06:31 +0100
committerIan Hua <ianhua@google.com>2021-10-27 11:55:25 +0100
commitca46f9768c056dc52aa4ef3988cfaea155ed0dc5 (patch)
tree4e29bf60e517ba6c58f17c342890c9dcaf4e3cbf /neuralnetworks/aidl/vts/functional/ValidateModel.cpp
parent5f14bad22cb3393dfa0e6ca132eecd050d676b56 (diff)
Add FL6 spec tests to AIDL VTS.
Also skip FL6 (AIDL_V2) tests for older AIDL drivers. Bug: 203038813 Test: VtsHalNeuralnetworksTargetTest Specifically, for old driver such as AIDL_V1 sample driver, it can pass HIDL tests and skip AIDL_V2 tests. For new driver such as AIDL_V2 sample driver, it can pass all tests. Change-Id: I689fef0945428f6548977628e3c43628dd1e5bf7
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/ValidateModel.cpp')
-rw-r--r--neuralnetworks/aidl/vts/functional/ValidateModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/neuralnetworks/aidl/vts/functional/ValidateModel.cpp b/neuralnetworks/aidl/vts/functional/ValidateModel.cpp
index 3f3e2250c6..fdc7eff96f 100644
--- a/neuralnetworks/aidl/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/aidl/vts/functional/ValidateModel.cpp
@@ -1122,6 +1122,7 @@ static bool removeOperationInputSkip(const Operation& op, size_t input) {
// align_corners and half_pixel_centers parameters.
// - L2_NORMALIZATION, LOCAL_RESPONSE_NORMALIZATION, SOFTMAX can have an optional axis
// parameter.
+ // - PACK has at least 2 inputs, with the first element being INT32.
switch (op.type) {
case OperationType::CONCATENATION: {
if (op.inputs.size() > 2 && input != op.inputs.size() - 1) {
@@ -1178,6 +1179,11 @@ static bool removeOperationInputSkip(const Operation& op, size_t input) {
return true;
}
} break;
+ case OperationType::PACK: {
+ if (op.inputs.size() > 2 && input != 0) {
+ return true;
+ }
+ } break;
default:
break;
}