Rename setInputsAndOutputs
To avoid confusion with other set* functions, rename setInputsAndOutputs
to identifyInputsAndOutputs.
Also added a few new generated tests when I reran generate_test.sh.
Bug: 63905942
Test: local & VTS tests
Change-Id: Ie947044bee1a97426c847b9d66e60f0c25395bbc
diff --git a/nn/common/operations/EmbeddingLookupTest.cpp b/nn/common/operations/EmbeddingLookupTest.cpp
index 922e398..d03e168 100644
--- a/nn/common/operations/EmbeddingLookupTest.cpp
+++ b/nn/common/operations/EmbeddingLookupTest.cpp
@@ -83,7 +83,7 @@
Output_.insert(Output_.end(), multiAll(weight_shape), 0.f);
model_.addOperation(ANEURALNETWORKS_EMBEDDING_LOOKUP, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
model_.finish();
}
diff --git a/nn/common/operations/HashtableLookupTest.cpp b/nn/common/operations/HashtableLookupTest.cpp
index 6d39a75..ecc6c1a 100644
--- a/nn/common/operations/HashtableLookupTest.cpp
+++ b/nn/common/operations/HashtableLookupTest.cpp
@@ -97,7 +97,7 @@
Hits_.insert(Hits_.end(), multiAll(lookup_shape), 0);
model_.addOperation(ANEURALNETWORKS_HASHTABLE_LOOKUP, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
model_.finish();
}
diff --git a/nn/common/operations/LSHProjectionTest.cpp b/nn/common/operations/LSHProjectionTest.cpp
index d920f07..2d23290 100644
--- a/nn/common/operations/LSHProjectionTest.cpp
+++ b/nn/common/operations/LSHProjectionTest.cpp
@@ -78,7 +78,7 @@
}
model_.addOperation(ANEURALNETWORKS_LSH_PROJECTION, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
model_.finish();
}
diff --git a/nn/common/operations/LSTMTest.cpp b/nn/common/operations/LSTMTest.cpp
index b8a80ec..6a05e04 100644
--- a/nn/common/operations/LSTMTest.cpp
+++ b/nn/common/operations/LSTMTest.cpp
@@ -128,7 +128,7 @@
#undef AddOutput
model_.addOperation(ANEURALNETWORKS_LSTM, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
Input_.insert(Input_.end(), n_batch * n_input, 0.f);
diff --git a/nn/common/operations/RNNTest.cpp b/nn/common/operations/RNNTest.cpp
index 7561f33..323484b 100644
--- a/nn/common/operations/RNNTest.cpp
+++ b/nn/common/operations/RNNTest.cpp
@@ -181,7 +181,7 @@
Output_.insert(Output_.end(), batches_ * units_, 0.f);
model_.addOperation(ANEURALNETWORKS_RNN, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
model_.finish();
}
diff --git a/nn/common/operations/SVDFTest.cpp b/nn/common/operations/SVDFTest.cpp
index a3c32e2..b5940e0 100644
--- a/nn/common/operations/SVDFTest.cpp
+++ b/nn/common/operations/SVDFTest.cpp
@@ -180,7 +180,7 @@
FOR_ALL_OUTPUT_TENSORS(ReserveOutput);
model_.addOperation(ANEURALNETWORKS_SVDF, inputs, outputs);
- model_.setInputsAndOutputs(inputs, outputs);
+ model_.identifyInputsAndOutputs(inputs, outputs);
model_.finish();
}
diff --git a/nn/runtime/ExecutionPlan.cpp b/nn/runtime/ExecutionPlan.cpp
index c969fe9..523403e 100644
--- a/nn/runtime/ExecutionPlan.cpp
+++ b/nn/runtime/ExecutionPlan.cpp
@@ -336,7 +336,7 @@
}
{
- int n = mSubModel->setInputsAndOutputs(inputs.size(), &inputs[0], outputs.size(), &outputs[0]);
+ int n = mSubModel->identifyInputsAndOutputs(inputs.size(), &inputs[0], outputs.size(), &outputs[0]);
if (n != ANEURALNETWORKS_NO_ERROR) {
return n;
}
diff --git a/nn/runtime/ModelBuilder.cpp b/nn/runtime/ModelBuilder.cpp
index c121808..2274b89 100644
--- a/nn/runtime/ModelBuilder.cpp
+++ b/nn/runtime/ModelBuilder.cpp
@@ -154,19 +154,19 @@
return ANEURALNETWORKS_NO_ERROR;
}
-int ModelBuilder::setInputsAndOutputs(uint32_t inputCount, const uint32_t* inputs,
+int ModelBuilder::identifyInputsAndOutputs(uint32_t inputCount, const uint32_t* inputs,
uint32_t outputCount, const uint32_t* outputs) {
if (mCompletedModel) {
- LOG(ERROR) << "ANeuralNetworksModel_setInputsAndOutputs can't modify after model finished";
+ LOG(ERROR) << "ANeuralNetworksModel_identifyInputsAndOutputs can't modify after model finished";
return ANEURALNETWORKS_BAD_DATA;
}
int n = validateOperandList(inputCount, inputs, operandCount(),
- "ANeuralNetworksModel_setInputsAndOutputs inputs");
+ "ANeuralNetworksModel_identifyInputsAndOutputs inputs");
if (n != ANEURALNETWORKS_NO_ERROR) {
return n;
}
n = validateOperandList(outputCount, outputs, operandCount(),
- "ANeuralNetworksModel_setInputsAndOutputs outputs");
+ "ANeuralNetworksModel_identifyInputsAndOutputs outputs");
if (n != ANEURALNETWORKS_NO_ERROR) {
return n;
}
@@ -179,7 +179,7 @@
for (uint32_t i = 0; i < indexCount; i++) {
const uint32_t operandIndex = indexList[i];
if (operandIndex >= mOperands.size()) {
- LOG(ERROR) << "ANeuralNetworksModel_setInputsAndOutputs Can't set input or output "
+ LOG(ERROR) << "ANeuralNetworksModel_identifyInputsAndOutputs Can't set input or output "
"to be "
<< operandIndex << " as this exceeds the numbe of operands "
<< mOperands.size();
@@ -188,7 +188,7 @@
(*indexVector)[i] = operandIndex;
Operand& operand = mOperands[operandIndex];
if (operand.lifetime != OperandLifeTime::TEMPORARY_VARIABLE) {
- LOG(ERROR) << "ANeuralNetworksModel_setInputsAndOutputs Can't set operand "
+ LOG(ERROR) << "ANeuralNetworksModel_identifyInputsAndOutputs Can't set operand "
<< operandIndex
<< " to be an input or output. Check that it's not a constant or "
"already an input or output";
diff --git a/nn/runtime/ModelBuilder.h b/nn/runtime/ModelBuilder.h
index 1c725dd..24c959c 100644
--- a/nn/runtime/ModelBuilder.h
+++ b/nn/runtime/ModelBuilder.h
@@ -46,8 +46,8 @@
int addOperation(ANeuralNetworksOperationType type, uint32_t inputCount, const uint32_t* inputs,
uint32_t outputCount, const uint32_t* outputs);
- int setInputsAndOutputs(uint32_t inputCount, const uint32_t* inputs, uint32_t outputCount,
- const uint32_t* outputs);
+ int identifyInputsAndOutputs(uint32_t inputCount, const uint32_t* inputs, uint32_t outputCount,
+ const uint32_t* outputs);
int finish();
bool isFinished() const { return mCompletedModel; }
diff --git a/nn/runtime/NeuralNetworks.cpp b/nn/runtime/NeuralNetworks.cpp
index 0ca7076..f9785c2 100644
--- a/nn/runtime/NeuralNetworks.cpp
+++ b/nn/runtime/NeuralNetworks.cpp
@@ -307,15 +307,15 @@
return m->addOperation(type, inputCount, inputs, outputCount, outputs);
}
-int ANeuralNetworksModel_setInputsAndOutputs(ANeuralNetworksModel* model, uint32_t inputCount,
- const uint32_t* inputs, uint32_t outputCount,
- const uint32_t* outputs) {
+int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, uint32_t inputCount,
+ const uint32_t* inputs, uint32_t outputCount,
+ const uint32_t* outputs) {
if (!model || !inputs || !outputs) {
- LOG(ERROR) << ("ANeuralNetworksModel_setInputsAndOutputs passed a nullptr");
+ LOG(ERROR) << ("ANeuralNetworksModel_identifyInputsAndOutputs passed a nullptr");
return ANEURALNETWORKS_UNEXPECTED_NULL;
}
ModelBuilder* m = reinterpret_cast<ModelBuilder*>(model);
- return m->setInputsAndOutputs(inputCount, inputs, outputCount, outputs);
+ return m->identifyInputsAndOutputs(inputCount, inputs, outputCount, outputs);
}
int ANeuralNetworksCompilation_create(ANeuralNetworksModel* model,
diff --git a/nn/runtime/include/NeuralNetworks.h b/nn/runtime/include/NeuralNetworks.h
index 40b24a4..eb94cf3 100644
--- a/nn/runtime/include/NeuralNetworks.h
+++ b/nn/runtime/include/NeuralNetworks.h
@@ -1547,9 +1547,9 @@
* See {@link ANeuralNetworksModel} for information on multithreaded usage.
*
*/
-int ANeuralNetworksModel_setInputsAndOutputs(ANeuralNetworksModel* model, uint32_t inputCount,
- const uint32_t* inputs, uint32_t outputCount,
- const uint32_t* outputs);
+int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, uint32_t inputCount,
+ const uint32_t* inputs, uint32_t outputCount,
+ const uint32_t* outputs);
/**
* Create a {@link ANeuralNetworksCompilation} to compile the given model.
@@ -1675,7 +1675,7 @@
* @param execution The execution to be modified.
* @param index The index of the input argument we are setting. It is
* an index into the lists passed to
- * {@link ANeuralNetworksModel_setInputsAndOutputs}. It is not
+ * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not
* the index associated with {@link ANeuralNetworksModel_addOperand}.
* @param type The type of the operand. This should be used to specify the
* dimensions that were set to 0 when the operand was added to the
@@ -1707,7 +1707,7 @@
* @param execution The execution to be modified.
* @param index The index of the input argument we are setting. It is
* an index into the lists passed to
- * {@link ANeuralNetworksModel_setInputsAndOutputs}. It is not
+ * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not
* the index associated with {@link ANeuralNetworksModel_addOperand}.
* @param type The type of the operand. This can be used to specify the
* dimensions that were set to 0 when the operand was added to the
@@ -1741,7 +1741,7 @@
* @param execution The execution to be modified.
* @param index The index of the output argument we are setting. It is
* an index into the lists passed to
- * {@link ANeuralNetworksModel_setInputsAndOutputs}. It is not
+ * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not
* the index associated with {@link ANeuralNetworksModel_addOperand}.
* @param type The type of the operand. This can be used to specify the
* dimensions that were set to 0 when the operand was added to the
@@ -1773,7 +1773,7 @@
* @param execution The execution to be modified.
* @param index The index of the output argument we are setting. It is
* an index into the lists passed to
- * {@link ANeuralNetworksModel_setInputsAndOutputs}. It is not
+ * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not
* the index associated with {@link ANeuralNetworksModel_addOperand}.
* @param type The type of the operand. This can be used to specify the
* dimensions that were set to 0 when the operand was added to the
diff --git a/nn/runtime/include/NeuralNetworksWrapper.h b/nn/runtime/include/NeuralNetworksWrapper.h
index e5cc2cf..366931d 100644
--- a/nn/runtime/include/NeuralNetworksWrapper.h
+++ b/nn/runtime/include/NeuralNetworksWrapper.h
@@ -56,8 +56,9 @@
// int32_t type;
std::vector<uint32_t> dimensions;
- OperandType(Type type, const std::vector<uint32_t>& d,
- float scale = 0.0f, int32_t zeroPoint = 0) : dimensions(d) {
+ OperandType(Type type, const std::vector<uint32_t>& d, float scale = 0.0f,
+ int32_t zeroPoint = 0)
+ : dimensions(d) {
operandType.type = static_cast<int32_t>(type);
operandType.scale = scale;
operandType.zeroPoint = zeroPoint;
@@ -134,9 +135,7 @@
return *this;
}
- Result finish() {
- return static_cast<Result>(ANeuralNetworksModel_finish(mModel));
- }
+ Result finish() { return static_cast<Result>(ANeuralNetworksModel_finish(mModel)); }
uint32_t addOperand(const OperandType* type) {
if (ANeuralNetworksModel_addOperand(mModel, &(type->operandType)) !=
@@ -169,12 +168,12 @@
mValid = false;
}
}
- void setInputsAndOutputs(const std::vector<uint32_t>& inputs,
- const std::vector<uint32_t>& outputs) {
- if (ANeuralNetworksModel_setInputsAndOutputs(mModel, static_cast<uint32_t>(inputs.size()),
- inputs.data(),
- static_cast<uint32_t>(outputs.size()),
- outputs.data()) != ANEURALNETWORKS_NO_ERROR) {
+ void identifyInputsAndOutputs(const std::vector<uint32_t>& inputs,
+ const std::vector<uint32_t>& outputs) {
+ if (ANeuralNetworksModel_identifyInputsAndOutputs(
+ mModel, static_cast<uint32_t>(inputs.size()), inputs.data(),
+ static_cast<uint32_t>(outputs.size()),
+ outputs.data()) != ANEURALNETWORKS_NO_ERROR) {
mValid = false;
}
}
@@ -202,9 +201,7 @@
// Move semantics to remove access to the runtime object from the wrapper
// object that is being moved. This ensures the runtime object will be
// freed only once.
- Event(Event&& other) {
- *this = std::move(other);
- }
+ Event(Event&& other) { *this = std::move(other); }
Event& operator=(Event&& other) {
if (this != &other) {
mEvent = other.mEvent;
@@ -253,9 +250,7 @@
mCompilation, static_cast<int32_t>(preference)));
}
- Result finish() {
- return static_cast<Result>(ANeuralNetworksCompilation_finish(mCompilation));
- }
+ Result finish() { return static_cast<Result>(ANeuralNetworksCompilation_finish(mCompilation)); }
ANeuralNetworksCompilation* getHandle() const { return mCompilation; }
@@ -326,7 +321,7 @@
Result compute() {
ANeuralNetworksEvent* event = nullptr;
Result result =
- static_cast<Result>(ANeuralNetworksExecution_startCompute(mExecution, &event));
+ static_cast<Result>(ANeuralNetworksExecution_startCompute(mExecution, &event));
if (result != Result::NO_ERROR) {
return result;
}
diff --git a/nn/runtime/libneuralnetworks.map.txt b/nn/runtime/libneuralnetworks.map.txt
index 13a68c0..cfbe8d4 100644
--- a/nn/runtime/libneuralnetworks.map.txt
+++ b/nn/runtime/libneuralnetworks.map.txt
@@ -29,7 +29,7 @@
ANeuralNetworksModel_setOperandValue;
ANeuralNetworksModel_setOperandValueFromMemory;
ANeuralNetworksModel_addOperation;
- ANeuralNetworksModel_setInputsAndOutputs;
+ ANeuralNetworksModel_identifyInputsAndOutputs;
ANeuralNetworksCompilation_create;
ANeuralNetworksCompilation_free;
ANeuralNetworksCompilation_setPreference;
diff --git a/nn/runtime/test/TestMemory.cpp b/nn/runtime/test/TestMemory.cpp
index fd8756f..30785db 100644
--- a/nn/runtime/test/TestMemory.cpp
+++ b/nn/runtime/test/TestMemory.cpp
@@ -102,7 +102,7 @@
model.setOperandValue(f, &activation, sizeof(activation));
model.addOperation(ANEURALNETWORKS_ADD, {a, c, f}, {b});
model.addOperation(ANEURALNETWORKS_ADD, {b, e, f}, {d});
- model.setInputsAndOutputs({c}, {d});
+ model.identifyInputsAndOutputs({c}, {d});
ASSERT_TRUE(model.isValid());
model.finish();
@@ -171,7 +171,7 @@
model.setOperandValue(f, &activation, sizeof(activation));
model.addOperation(ANEURALNETWORKS_ADD, {a, c, f}, {b});
model.addOperation(ANEURALNETWORKS_ADD, {b, e, f}, {d});
- model.setInputsAndOutputs({c}, {d});
+ model.identifyInputsAndOutputs({c}, {d});
ASSERT_TRUE(model.isValid());
model.finish();
diff --git a/nn/runtime/test/TestTrivialModel.cpp b/nn/runtime/test/TestTrivialModel.cpp
index 493b7a8..14935e3 100644
--- a/nn/runtime/test/TestTrivialModel.cpp
+++ b/nn/runtime/test/TestTrivialModel.cpp
@@ -70,7 +70,7 @@
auto d = model->addOperand(&scalarType);
model->setOperandValue(d, &activation, sizeof(activation));
model->addOperation(ANEURALNETWORKS_ADD, {a, b, d}, {c});
- model->setInputsAndOutputs({a, b}, {c});
+ model->identifyInputsAndOutputs({a, b}, {c});
ASSERT_TRUE(model->isValid());
model->finish();
}
@@ -91,7 +91,7 @@
model->setOperandValue(f, &activation, sizeof(activation));
model->addOperation(ANEURALNETWORKS_ADD, {a, c, f}, {b});
model->addOperation(ANEURALNETWORKS_ADD, {b, e, f}, {d});
- model->setInputsAndOutputs({c, a}, {d});
+ model->identifyInputsAndOutputs({c, a}, {d});
ASSERT_TRUE(model->isValid());
model->finish();
}
@@ -172,7 +172,7 @@
auto b = modelBroadcastAdd2.addOperand(&matrixType2);
auto c = modelBroadcastAdd2.addOperand(&matrixType);
modelBroadcastAdd2.addOperation(ANEURALNETWORKS_ADD, {a, b, activation}, {c});
- modelBroadcastAdd2.setInputsAndOutputs({a, b}, {c});
+ modelBroadcastAdd2.identifyInputsAndOutputs({a, b}, {c});
ASSERT_TRUE(modelBroadcastAdd2.isValid());
modelBroadcastAdd2.finish();
@@ -204,7 +204,7 @@
auto b = modelBroadcastMul2.addOperand(&matrixType2);
auto c = modelBroadcastMul2.addOperand(&matrixType);
modelBroadcastMul2.addOperation(ANEURALNETWORKS_MUL, {a, b, activation}, {c});
- modelBroadcastMul2.setInputsAndOutputs({a, b}, {c});
+ modelBroadcastMul2.identifyInputsAndOutputs({a, b}, {c});
ASSERT_TRUE(modelBroadcastMul2.isValid());
modelBroadcastMul2.finish();
diff --git a/nn/runtime/test/TestValidation.cpp b/nn/runtime/test/TestValidation.cpp
index d5739e8..4ac8fc1 100644
--- a/nn/runtime/test/TestValidation.cpp
+++ b/nn/runtime/test/TestValidation.cpp
@@ -148,11 +148,11 @@
TEST_F(ValidationTestModel, SetInputsAndOutputs) {
uint32_t input = 0;
uint32_t output = 0;
- EXPECT_EQ(ANeuralNetworksModel_setInputsAndOutputs(nullptr, 1, &input, 1, &output),
+ EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(nullptr, 1, &input, 1, &output),
ANEURALNETWORKS_UNEXPECTED_NULL);
- EXPECT_EQ(ANeuralNetworksModel_setInputsAndOutputs(mModel, 0, nullptr, 1, &output),
+ EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 0, nullptr, 1, &output),
ANEURALNETWORKS_UNEXPECTED_NULL);
- EXPECT_EQ(ANeuralNetworksModel_setInputsAndOutputs(mModel, 1, &input, 0, nullptr),
+ EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 1, &input, 0, nullptr),
ANEURALNETWORKS_UNEXPECTED_NULL);
}
diff --git a/nn/runtime/test/generated/all_generated_tests.cpp b/nn/runtime/test/generated/all_generated_tests.cpp
index a6552bf..2381bc6 100644
--- a/nn/runtime/test/generated/all_generated_tests.cpp
+++ b/nn/runtime/test/generated/all_generated_tests.cpp
@@ -589,6 +589,20 @@
hashtable_lookup_quant8::examples);
}
+namespace l2_normalization_large {
+std::vector<MixedTypedExample> examples = {
+// Generated l2_normalization_large test
+#include "generated/examples/l2_normalization_large.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/l2_normalization_large.model.cpp"
+} // namespace l2_normalization_large
+TEST_F(GeneratedTests, l2_normalization_large) {
+ Execute(l2_normalization_large::CreateModel,
+ l2_normalization_large::is_ignored,
+ l2_normalization_large::examples);
+}
+
namespace l2_normalization {
std::vector<MixedTypedExample> examples = {
// Generated l2_normalization test
@@ -603,6 +617,20 @@
l2_normalization::examples);
}
+namespace l2_pool_float_large {
+std::vector<MixedTypedExample> examples = {
+// Generated l2_pool_float_large test
+#include "generated/examples/l2_pool_float_large.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/l2_pool_float_large.model.cpp"
+} // namespace l2_pool_float_large
+TEST_F(GeneratedTests, l2_pool_float_large) {
+ Execute(l2_pool_float_large::CreateModel,
+ l2_pool_float_large::is_ignored,
+ l2_pool_float_large::examples);
+}
+
namespace l2_pool_float {
std::vector<MixedTypedExample> examples = {
// Generated l2_pool_float test
@@ -869,6 +897,20 @@
max_pool_quant8_3::examples);
}
+namespace mobilenet_quantized {
+std::vector<MixedTypedExample> examples = {
+// Generated mobilenet_quantized test
+#include "generated/examples/mobilenet_quantized.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/mobilenet_quantized.model.cpp"
+} // namespace mobilenet_quantized
+TEST_F(GeneratedTests, mobilenet_quantized) {
+ Execute(mobilenet_quantized::CreateModel,
+ mobilenet_quantized::is_ignored,
+ mobilenet_quantized::examples);
+}
+
namespace mul_broadcast_quant8 {
std::vector<MixedTypedExample> examples = {
// Generated mul_broadcast_quant8 test
diff --git a/nn/runtime/test/generated/all_generated_vts_tests.cpp b/nn/runtime/test/generated/all_generated_vts_tests.cpp
index 69bf051..fe67060 100644
--- a/nn/runtime/test/generated/all_generated_vts_tests.cpp
+++ b/nn/runtime/test/generated/all_generated_vts_tests.cpp
@@ -631,6 +631,21 @@
hashtable_lookup_quant8::examples);
}
+namespace l2_normalization_large {
+std::vector<MixedTypedExample> examples = {
+// Generated l2_normalization_large test
+#include "examples/l2_normalization_large.example.cpp"
+};
+// Generated model constructor
+#include "vts_models/l2_normalization_large.model.cpp"
+} // namespace l2_normalization_large
+TEST_F(NeuralnetworksHidlTest, l2_normalization_large) {
+ generated_tests::Execute(device,
+ l2_normalization_large::createTestModel,
+ l2_normalization_large::is_ignored,
+ l2_normalization_large::examples);
+}
+
namespace l2_normalization {
std::vector<MixedTypedExample> examples = {
// Generated l2_normalization test
@@ -646,6 +661,21 @@
l2_normalization::examples);
}
+namespace l2_pool_float_large {
+std::vector<MixedTypedExample> examples = {
+// Generated l2_pool_float_large test
+#include "examples/l2_pool_float_large.example.cpp"
+};
+// Generated model constructor
+#include "vts_models/l2_pool_float_large.model.cpp"
+} // namespace l2_pool_float_large
+TEST_F(NeuralnetworksHidlTest, l2_pool_float_large) {
+ generated_tests::Execute(device,
+ l2_pool_float_large::createTestModel,
+ l2_pool_float_large::is_ignored,
+ l2_pool_float_large::examples);
+}
+
namespace l2_pool_float {
std::vector<MixedTypedExample> examples = {
// Generated l2_pool_float test
diff --git a/nn/runtime/test/generated/examples/l2_normalization_large.example.cpp b/nn/runtime/test/generated/examples/l2_normalization_large.example.cpp
new file mode 100644
index 0000000..d8f2e37
--- /dev/null
+++ b/nn/runtime/test/generated/examples/l2_normalization_large.example.cpp
@@ -0,0 +1,22 @@
+// Generated file (from: l2_normalization_large.mod.py). Do not edit
+// Begin of an example
+{
+//Input(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {0, 3, 4, 0, 5, 12, 0, 8, 15, 0, 7, 24}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+},
+//Output(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {0, 0.6f, 0.8f, 0, 0.38461539149284363f, 0.9230769872665405f, 0, 0.47058823704719543f, 0.8823529481887817f, 0, 0.28f, 0.96f}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+}
+}, // End of an example
diff --git a/nn/runtime/test/generated/examples/l2_pool_float_large.example.cpp b/nn/runtime/test/generated/examples/l2_pool_float_large.example.cpp
new file mode 100644
index 0000000..80ab993
--- /dev/null
+++ b/nn/runtime/test/generated/examples/l2_pool_float_large.example.cpp
@@ -0,0 +1,22 @@
+// Generated file (from: l2_pool_float_large.mod.py). Do not edit
+// Begin of an example
+{
+//Input(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+},
+//Output(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {6.442049503326416f, 7.314369201660156f, 8.215838432312012f}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+}
+}, // End of an example
diff --git a/nn/runtime/test/generated/models/add.model.cpp b/nn/runtime/test/generated/models/add.model.cpp
index 3382499..e8b3aa1 100644
--- a/nn/runtime/test/generated/models/add.model.cpp
+++ b/nn/runtime/test/generated/models/add.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/add_broadcast_quant8.model.cpp b/nn/runtime/test/generated/models/add_broadcast_quant8.model.cpp
index ca7c377..3dd6f3f 100644
--- a/nn/runtime/test/generated/models/add_broadcast_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/add_broadcast_quant8.model.cpp
@@ -13,7 +13,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/add_quant8.model.cpp b/nn/runtime/test/generated/models/add_quant8.model.cpp
index 7ca4840..57c7c57 100644
--- a/nn/runtime/test/generated/models/add_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/add_quant8.model.cpp
@@ -13,7 +13,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_float_1.model.cpp b/nn/runtime/test/generated/models/avg_pool_float_1.model.cpp
index 87bca77..9f3b02e 100644
--- a/nn/runtime/test/generated/models/avg_pool_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_float_1.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_float_2.model.cpp b/nn/runtime/test/generated/models/avg_pool_float_2.model.cpp
index afcbffe..f6f2e5b 100644
--- a/nn/runtime/test/generated/models/avg_pool_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_float_2.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_float_3.model.cpp b/nn/runtime/test/generated/models/avg_pool_float_3.model.cpp
index d9a2cc5..c056c61 100644
--- a/nn/runtime/test/generated/models/avg_pool_float_3.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_float_3.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_float_4.model.cpp b/nn/runtime/test/generated/models/avg_pool_float_4.model.cpp
index 33f7dc8..d3b6133 100644
--- a/nn/runtime/test/generated/models/avg_pool_float_4.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_float_4.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(relu6_activation, relu6_activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, relu6_activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_quant8_1.model.cpp b/nn/runtime/test/generated/models/avg_pool_quant8_1.model.cpp
index 8a85eb3..c14c383 100644
--- a/nn/runtime/test/generated/models/avg_pool_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_quant8_1.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_quant8_2.model.cpp b/nn/runtime/test/generated/models/avg_pool_quant8_2.model.cpp
index ede7365..0d346d4 100644
--- a/nn/runtime/test/generated/models/avg_pool_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_quant8_2.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_quant8_3.model.cpp b/nn/runtime/test/generated/models/avg_pool_quant8_3.model.cpp
index 2e2d4b1..4bcab8f 100644
--- a/nn/runtime/test/generated/models/avg_pool_quant8_3.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_quant8_3.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/avg_pool_quant8_4.model.cpp b/nn/runtime/test/generated/models/avg_pool_quant8_4.model.cpp
index b390b68..9981387 100644
--- a/nn/runtime/test/generated/models/avg_pool_quant8_4.model.cpp
+++ b/nn/runtime/test/generated/models/avg_pool_quant8_4.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(relu1_activitation, relu1_activitation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, relu1_activitation}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_float_1.model.cpp b/nn/runtime/test/generated/models/concat_float_1.model.cpp
index 8a6c0c3..a40506d 100644
--- a/nn/runtime/test/generated/models/concat_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/concat_float_1.model.cpp
@@ -13,7 +13,7 @@
model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {op1, op2, axis0}, {result});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{result});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_float_2.model.cpp b/nn/runtime/test/generated/models/concat_float_2.model.cpp
index a822531..2938a1a 100644
--- a/nn/runtime/test/generated/models/concat_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/concat_float_2.model.cpp
@@ -14,7 +14,7 @@
model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis0}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input1, input2},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_float_3.model.cpp b/nn/runtime/test/generated/models/concat_float_3.model.cpp
index 8caff55..ac5cc8f 100644
--- a/nn/runtime/test/generated/models/concat_float_3.model.cpp
+++ b/nn/runtime/test/generated/models/concat_float_3.model.cpp
@@ -14,7 +14,7 @@
model->setOperandValue(axis1, axis1_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis1}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input1, input2},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_quant8_1.model.cpp b/nn/runtime/test/generated/models/concat_quant8_1.model.cpp
index c8c4c81..ab377d6 100644
--- a/nn/runtime/test/generated/models/concat_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/concat_quant8_1.model.cpp
@@ -13,7 +13,7 @@
model->setOperandValue(axis1, axis1_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {op1, op2, axis1}, {result});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{result});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_quant8_2.model.cpp b/nn/runtime/test/generated/models/concat_quant8_2.model.cpp
index e327428..286b5d8 100644
--- a/nn/runtime/test/generated/models/concat_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/concat_quant8_2.model.cpp
@@ -14,7 +14,7 @@
model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis0}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input1, input2},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/concat_quant8_3.model.cpp b/nn/runtime/test/generated/models/concat_quant8_3.model.cpp
index b90f0a4..085c0d9 100644
--- a/nn/runtime/test/generated/models/concat_quant8_3.model.cpp
+++ b/nn/runtime/test/generated/models/concat_quant8_3.model.cpp
@@ -14,7 +14,7 @@
model->setOperandValue(axis1, axis1_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis1}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input1, input2},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_1_h3_w2_SAME.model.cpp b/nn/runtime/test/generated/models/conv_1_h3_w2_SAME.model.cpp
index b12ede5..82fe118 100644
--- a/nn/runtime/test/generated/models/conv_1_h3_w2_SAME.model.cpp
+++ b/nn/runtime/test/generated/models/conv_1_h3_w2_SAME.model.cpp
@@ -31,7 +31,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, pad0, pad1, pad1, pad1, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_1_h3_w2_VALID.model.cpp b/nn/runtime/test/generated/models/conv_1_h3_w2_VALID.model.cpp
index 198db9b..7d9634d 100644
--- a/nn/runtime/test/generated/models/conv_1_h3_w2_VALID.model.cpp
+++ b/nn/runtime/test/generated/models/conv_1_h3_w2_VALID.model.cpp
@@ -28,7 +28,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, pad0, pad0, pad0, pad0, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_3_h3_w2_SAME.model.cpp b/nn/runtime/test/generated/models/conv_3_h3_w2_SAME.model.cpp
index a3ae5a5..dec8578 100644
--- a/nn/runtime/test/generated/models/conv_3_h3_w2_SAME.model.cpp
+++ b/nn/runtime/test/generated/models/conv_3_h3_w2_SAME.model.cpp
@@ -30,7 +30,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 3);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, pad0, pad1, pad1, pad1, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_3_h3_w2_VALID.model.cpp b/nn/runtime/test/generated/models/conv_3_h3_w2_VALID.model.cpp
index 58e4e2e..c6cbb0a 100644
--- a/nn/runtime/test/generated/models/conv_3_h3_w2_VALID.model.cpp
+++ b/nn/runtime/test/generated/models/conv_3_h3_w2_VALID.model.cpp
@@ -28,7 +28,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 3);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, pad0, pad0, pad0, pad0, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_float.model.cpp b/nn/runtime/test/generated/models/conv_float.model.cpp
index 1264c09..b179b3b 100644
--- a/nn/runtime/test/generated/models/conv_float.model.cpp
+++ b/nn/runtime/test/generated/models/conv_float.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_float_channels.model.cpp b/nn/runtime/test/generated/models/conv_float_channels.model.cpp
index 6265bea..bbcfd29 100644
--- a/nn/runtime/test/generated/models/conv_float_channels.model.cpp
+++ b/nn/runtime/test/generated/models/conv_float_channels.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_float_large.model.cpp b/nn/runtime/test/generated/models/conv_float_large.model.cpp
index d30b80d..c629c06 100644
--- a/nn/runtime/test/generated/models/conv_float_large.model.cpp
+++ b/nn/runtime/test/generated/models/conv_float_large.model.cpp
@@ -22,7 +22,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_quant8.model.cpp b/nn/runtime/test/generated/models/conv_quant8.model.cpp
index 4da65fc..46a62a3 100644
--- a/nn/runtime/test/generated/models/conv_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/conv_quant8.model.cpp
@@ -22,7 +22,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_quant8_channels.model.cpp b/nn/runtime/test/generated/models/conv_quant8_channels.model.cpp
index 031b007..04b9bed 100644
--- a/nn/runtime/test/generated/models/conv_quant8_channels.model.cpp
+++ b/nn/runtime/test/generated/models/conv_quant8_channels.model.cpp
@@ -22,7 +22,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_quant8_large.model.cpp b/nn/runtime/test/generated/models/conv_quant8_large.model.cpp
index c16ab23..7bd13d6 100644
--- a/nn/runtime/test/generated/models/conv_quant8_large.model.cpp
+++ b/nn/runtime/test/generated/models/conv_quant8_large.model.cpp
@@ -22,7 +22,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/conv_quant8_overflow.model.cpp b/nn/runtime/test/generated/models/conv_quant8_overflow.model.cpp
index ac3dc6a..960233a 100644
--- a/nn/runtime/test/generated/models/conv_quant8_overflow.model.cpp
+++ b/nn/runtime/test/generated/models/conv_quant8_overflow.model.cpp
@@ -22,7 +22,7 @@
model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depth_to_space_float_1.model.cpp b/nn/runtime/test/generated/models/depth_to_space_float_1.model.cpp
index 800d130..12a8b69 100644
--- a/nn/runtime/test/generated/models/depth_to_space_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/depth_to_space_float_1.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depth_to_space_float_2.model.cpp b/nn/runtime/test/generated/models/depth_to_space_float_2.model.cpp
index edba9f5..80e27f5 100644
--- a/nn/runtime/test/generated/models/depth_to_space_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/depth_to_space_float_2.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depth_to_space_quant8_1.model.cpp b/nn/runtime/test/generated/models/depth_to_space_quant8_1.model.cpp
index fe2b0fb..791cb75 100644
--- a/nn/runtime/test/generated/models/depth_to_space_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/depth_to_space_quant8_1.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depth_to_space_quant8_2.model.cpp b/nn/runtime/test/generated/models/depth_to_space_quant8_2.model.cpp
index a37459a..f855432 100644
--- a/nn/runtime/test/generated/models/depth_to_space_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/depth_to_space_quant8_2.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv.model.cpp b/nn/runtime/test/generated/models/depthwise_conv.model.cpp
index 1807efa..8f28b53 100644
--- a/nn/runtime/test/generated/models/depthwise_conv.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv.model.cpp
@@ -30,7 +30,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 3);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op2, op0, op1, pad0, pad0, pad0, pad0, b5, b6, b7, b8}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv2d_float.model.cpp b/nn/runtime/test/generated/models/depthwise_conv2d_float.model.cpp
index 3c6bb8c..bfcabcd 100644
--- a/nn/runtime/test/generated/models/depthwise_conv2d_float.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv2d_float.model.cpp
@@ -23,7 +23,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv2d_float_large.model.cpp b/nn/runtime/test/generated/models/depthwise_conv2d_float_large.model.cpp
index 120856f..9a9852a 100644
--- a/nn/runtime/test/generated/models/depthwise_conv2d_float_large.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv2d_float_large.model.cpp
@@ -24,7 +24,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv2d_float_large_2.model.cpp b/nn/runtime/test/generated/models/depthwise_conv2d_float_large_2.model.cpp
index 2684dd2..740f500 100644
--- a/nn/runtime/test/generated/models/depthwise_conv2d_float_large_2.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv2d_float_large_2.model.cpp
@@ -24,7 +24,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv2d_quant8.model.cpp b/nn/runtime/test/generated/models/depthwise_conv2d_quant8.model.cpp
index e3f030a..7f2b4fc 100644
--- a/nn/runtime/test/generated/models/depthwise_conv2d_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv2d_quant8.model.cpp
@@ -24,7 +24,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv2d_quant8_large.model.cpp b/nn/runtime/test/generated/models/depthwise_conv2d_quant8_large.model.cpp
index 7fdd6e9..4060e4c 100644
--- a/nn/runtime/test/generated/models/depthwise_conv2d_quant8_large.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv2d_quant8_large.model.cpp
@@ -24,7 +24,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv_2d.model.cpp b/nn/runtime/test/generated/models/depthwise_conv_2d.model.cpp
index 6be0742..1514781 100644
--- a/nn/runtime/test/generated/models/depthwise_conv_2d.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv_2d.model.cpp
@@ -23,7 +23,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/depthwise_conv_2d_quant8.model.cpp b/nn/runtime/test/generated/models/depthwise_conv_2d_quant8.model.cpp
index 4aa76cf..3a21c4d 100644
--- a/nn/runtime/test/generated/models/depthwise_conv_2d_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/depthwise_conv_2d_quant8.model.cpp
@@ -24,7 +24,7 @@
model->setOperandValue(channelMultiplier, channelMultiplier_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op1, op2, op3, pad0, pad0, pad0, pad0, stride, stride, channelMultiplier, act}, {op4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/dequantize.model.cpp b/nn/runtime/test/generated/models/dequantize.model.cpp
index f0194b1..2488307 100644
--- a/nn/runtime/test/generated/models/dequantize.model.cpp
+++ b/nn/runtime/test/generated/models/dequantize.model.cpp
@@ -8,7 +8,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_DEQUANTIZE, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/embedding_lookup.model.cpp b/nn/runtime/test/generated/models/embedding_lookup.model.cpp
index b253d22..e59f4de 100644
--- a/nn/runtime/test/generated/models/embedding_lookup.model.cpp
+++ b/nn/runtime/test/generated/models/embedding_lookup.model.cpp
@@ -9,7 +9,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_EMBEDDING_LOOKUP, {value, index}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{value, index},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/floor.model.cpp b/nn/runtime/test/generated/models/floor.model.cpp
index f1175f0..2425f47 100644
--- a/nn/runtime/test/generated/models/floor.model.cpp
+++ b/nn/runtime/test/generated/models/floor.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_FLOOR, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/fully_connected_float.model.cpp b/nn/runtime/test/generated/models/fully_connected_float.model.cpp
index cb67595..bae1fcd 100644
--- a/nn/runtime/test/generated/models/fully_connected_float.model.cpp
+++ b/nn/runtime/test/generated/models/fully_connected_float.model.cpp
@@ -15,7 +15,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, b0},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/fully_connected_float_large.model.cpp b/nn/runtime/test/generated/models/fully_connected_float_large.model.cpp
index 38c5c71..ab0ff4f 100644
--- a/nn/runtime/test/generated/models/fully_connected_float_large.model.cpp
+++ b/nn/runtime/test/generated/models/fully_connected_float_large.model.cpp
@@ -15,7 +15,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, b0},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/fully_connected_quant8.model.cpp b/nn/runtime/test/generated/models/fully_connected_quant8.model.cpp
index 6f995c1..6311c1b 100644
--- a/nn/runtime/test/generated/models/fully_connected_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/fully_connected_quant8.model.cpp
@@ -16,7 +16,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, b0},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/fully_connected_quant8_large.model.cpp b/nn/runtime/test/generated/models/fully_connected_quant8_large.model.cpp
index f54357d..ec18a16 100644
--- a/nn/runtime/test/generated/models/fully_connected_quant8_large.model.cpp
+++ b/nn/runtime/test/generated/models/fully_connected_quant8_large.model.cpp
@@ -15,7 +15,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2, b0},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/hashtable_lookup_float.model.cpp b/nn/runtime/test/generated/models/hashtable_lookup_float.model.cpp
index 0d31c0a..8c5970d 100644
--- a/nn/runtime/test/generated/models/hashtable_lookup_float.model.cpp
+++ b/nn/runtime/test/generated/models/hashtable_lookup_float.model.cpp
@@ -14,7 +14,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_HASHTABLE_LOOKUP, {lookup, key, value}, {output, hits});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{lookup, key, value},
{output, hits});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/hashtable_lookup_quant8.model.cpp b/nn/runtime/test/generated/models/hashtable_lookup_quant8.model.cpp
index 5c6c418..043f2d3 100644
--- a/nn/runtime/test/generated/models/hashtable_lookup_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/hashtable_lookup_quant8.model.cpp
@@ -14,7 +14,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_HASHTABLE_LOOKUP, {lookup, key, value}, {output, hits});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{lookup, key, value},
{output, hits});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/l2_normalization.model.cpp b/nn/runtime/test/generated/models/l2_normalization.model.cpp
index 1256609..a207ba4 100644
--- a/nn/runtime/test/generated/models/l2_normalization.model.cpp
+++ b/nn/runtime/test/generated/models/l2_normalization.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_L2_NORMALIZATION, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/l2_normalization_large.model.cpp b/nn/runtime/test/generated/models/l2_normalization_large.model.cpp
new file mode 100644
index 0000000..cadfa7b
--- /dev/null
+++ b/nn/runtime/test/generated/models/l2_normalization_large.model.cpp
@@ -0,0 +1,19 @@
+// Generated file (from: l2_normalization_large.mod.py). Do not edit
+void CreateModel(Model *model) {
+ OperandType type0(Type::TENSOR_FLOAT32, {1, 2, 2, 3});
+ // Phase 1, operands
+ auto op1 = model->addOperand(&type0);
+ auto op2 = model->addOperand(&type0);
+ // Phase 2, operations
+ model->addOperation(ANEURALNETWORKS_L2_NORMALIZATION, {op1}, {op2});
+ // Phase 3, inputs and outputs
+ model->identifyInputsAndOutputs(
+ {op1},
+ {op2});
+ assert(model->isValid());
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}
diff --git a/nn/runtime/test/generated/models/l2_pool_float.model.cpp b/nn/runtime/test/generated/models/l2_pool_float.model.cpp
index dbac514..d3a7bf3 100644
--- a/nn/runtime/test/generated/models/l2_pool_float.model.cpp
+++ b/nn/runtime/test/generated/models/l2_pool_float.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_L2_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/l2_pool_float_large.model.cpp b/nn/runtime/test/generated/models/l2_pool_float_large.model.cpp
new file mode 100644
index 0000000..9c3c562
--- /dev/null
+++ b/nn/runtime/test/generated/models/l2_pool_float_large.model.cpp
@@ -0,0 +1,39 @@
+// Generated file (from: l2_pool_float_large.mod.py). Do not edit
+void CreateModel(Model *model) {
+ OperandType type1(Type::INT32, {});
+ OperandType type2(Type::TENSOR_FLOAT32, {1, 1, 1, 3});
+ OperandType type0(Type::TENSOR_FLOAT32, {1, 2, 2, 3});
+ // Phase 1, operands
+ auto op1 = model->addOperand(&type0);
+ auto filter_width = model->addOperand(&type1);
+ auto filter_height = model->addOperand(&type1);
+ auto stride_width = model->addOperand(&type1);
+ auto stride_height = model->addOperand(&type1);
+ auto pad0 = model->addOperand(&type1);
+ auto act = model->addOperand(&type1);
+ auto op3 = model->addOperand(&type2);
+ // Phase 2, operations
+ static int32_t filter_width_init[] = {2};
+ model->setOperandValue(filter_width, filter_width_init, sizeof(int32_t) * 1);
+ static int32_t filter_height_init[] = {2};
+ model->setOperandValue(filter_height, filter_height_init, sizeof(int32_t) * 1);
+ static int32_t stride_width_init[] = {1};
+ model->setOperandValue(stride_width, stride_width_init, sizeof(int32_t) * 1);
+ static int32_t stride_height_init[] = {1};
+ model->setOperandValue(stride_height, stride_height_init, sizeof(int32_t) * 1);
+ static int32_t pad0_init[] = {0};
+ model->setOperandValue(pad0, pad0_init, sizeof(int32_t) * 1);
+ static int32_t act_init[] = {0};
+ model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
+ model->addOperation(ANEURALNETWORKS_L2_POOL_2D, {op1, pad0, pad0, pad0, pad0, stride_width, stride_height, filter_width, filter_height, act}, {op3});
+ // Phase 3, inputs and outputs
+ model->identifyInputsAndOutputs(
+ {op1},
+ {op3});
+ assert(model->isValid());
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}
diff --git a/nn/runtime/test/generated/models/local_response_norm_float_1.model.cpp b/nn/runtime/test/generated/models/local_response_norm_float_1.model.cpp
index 462884a..7543bbe 100644
--- a/nn/runtime/test/generated/models/local_response_norm_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/local_response_norm_float_1.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_LOCAL_RESPONSE_NORMALIZATION, {input, radius, bias, alpha, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/local_response_norm_float_2.model.cpp b/nn/runtime/test/generated/models/local_response_norm_float_2.model.cpp
index fa5e133..5aae9a6 100644
--- a/nn/runtime/test/generated/models/local_response_norm_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/local_response_norm_float_2.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_LOCAL_RESPONSE_NORMALIZATION, {input, radius, bias, alpha, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/local_response_norm_float_3.model.cpp b/nn/runtime/test/generated/models/local_response_norm_float_3.model.cpp
index b73099f..016da49 100644
--- a/nn/runtime/test/generated/models/local_response_norm_float_3.model.cpp
+++ b/nn/runtime/test/generated/models/local_response_norm_float_3.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_LOCAL_RESPONSE_NORMALIZATION, {input, radius, bias, alpha, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/local_response_norm_float_4.model.cpp b/nn/runtime/test/generated/models/local_response_norm_float_4.model.cpp
index 4b1a109..8311f8f 100644
--- a/nn/runtime/test/generated/models/local_response_norm_float_4.model.cpp
+++ b/nn/runtime/test/generated/models/local_response_norm_float_4.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_LOCAL_RESPONSE_NORMALIZATION, {input, radius, bias, alpha, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/logistic_float_1.model.cpp b/nn/runtime/test/generated/models/logistic_float_1.model.cpp
index 8deff8e..2ca725f 100644
--- a/nn/runtime/test/generated/models/logistic_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/logistic_float_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LOGISTIC, {op1}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/logistic_float_2.model.cpp b/nn/runtime/test/generated/models/logistic_float_2.model.cpp
index 6208744..18d52cc 100644
--- a/nn/runtime/test/generated/models/logistic_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/logistic_float_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LOGISTIC, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/logistic_quant8_1.model.cpp b/nn/runtime/test/generated/models/logistic_quant8_1.model.cpp
index 8b21927..b0f97a9 100644
--- a/nn/runtime/test/generated/models/logistic_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/logistic_quant8_1.model.cpp
@@ -8,7 +8,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LOGISTIC, {op1}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/logistic_quant8_2.model.cpp b/nn/runtime/test/generated/models/logistic_quant8_2.model.cpp
index 87a1cad..b144183 100644
--- a/nn/runtime/test/generated/models/logistic_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/logistic_quant8_2.model.cpp
@@ -8,7 +8,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LOGISTIC, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/lsh_projection.model.cpp b/nn/runtime/test/generated/models/lsh_projection.model.cpp
index e446a8f..e445abd 100644
--- a/nn/runtime/test/generated/models/lsh_projection.model.cpp
+++ b/nn/runtime/test/generated/models/lsh_projection.model.cpp
@@ -14,7 +14,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LSH_PROJECTION, {hash, lookup, weight, type_param}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{hash, lookup, weight, type_param},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/lstm.model.cpp b/nn/runtime/test/generated/models/lstm.model.cpp
index 721d484..e5baa17 100644
--- a/nn/runtime/test/generated/models/lstm.model.cpp
+++ b/nn/runtime/test/generated/models/lstm.model.cpp
@@ -41,7 +41,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LSTM, {input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param}, {output_state_out, cell_state_out, output, scratch_buffer});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param},
{output_state_out, cell_state_out, output, scratch_buffer});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/lstm2.model.cpp b/nn/runtime/test/generated/models/lstm2.model.cpp
index 7580c11..14d7baf 100644
--- a/nn/runtime/test/generated/models/lstm2.model.cpp
+++ b/nn/runtime/test/generated/models/lstm2.model.cpp
@@ -41,7 +41,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LSTM, {input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param}, {output_state_out, cell_state_out, output, scratch_buffer});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param},
{output_state_out, cell_state_out, output, scratch_buffer});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/lstm3.model.cpp b/nn/runtime/test/generated/models/lstm3.model.cpp
index d87bce6..16f0662 100644
--- a/nn/runtime/test/generated/models/lstm3.model.cpp
+++ b/nn/runtime/test/generated/models/lstm3.model.cpp
@@ -42,7 +42,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_LSTM, {input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param}, {output_state_out, cell_state_out, output, scratch_buffer});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input, input_to_input_weights, input_to_forget_weights, input_to_cell_weights, input_to_output_weights, recurrent_to_intput_weights, recurrent_to_forget_weights, recurrent_to_cell_weights, recurrent_to_output_weights, cell_to_input_weights, cell_to_forget_weights, cell_to_output_weights, input_gate_bias, forget_gate_bias, cell_gate_bias, output_gate_bias, projection_weights, projection_bias, output_state_in, cell_state_in, activation_param, cell_clip_param, proj_clip_param},
{output_state_out, cell_state_out, output, scratch_buffer});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_float_1.model.cpp b/nn/runtime/test/generated/models/max_pool_float_1.model.cpp
index 32702b0..b37ce65 100644
--- a/nn/runtime/test/generated/models/max_pool_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_float_1.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_float_2.model.cpp b/nn/runtime/test/generated/models/max_pool_float_2.model.cpp
index 3142444..a0b89e1 100644
--- a/nn/runtime/test/generated/models/max_pool_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_float_2.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_float_3.model.cpp b/nn/runtime/test/generated/models/max_pool_float_3.model.cpp
index c43cdff..3d7e231 100644
--- a/nn/runtime/test/generated/models/max_pool_float_3.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_float_3.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(relu6_activation, relu6_activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, relu6_activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_quant8_1.model.cpp b/nn/runtime/test/generated/models/max_pool_quant8_1.model.cpp
index 0d6cb02..978dcbe 100644
--- a/nn/runtime/test/generated/models/max_pool_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_quant8_1.model.cpp
@@ -17,7 +17,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {op1, pad0, pad0, pad0, pad0, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_quant8_2.model.cpp b/nn/runtime/test/generated/models/max_pool_quant8_2.model.cpp
index 16ca21d..2ce9434 100644
--- a/nn/runtime/test/generated/models/max_pool_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_quant8_2.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/max_pool_quant8_3.model.cpp b/nn/runtime/test/generated/models/max_pool_quant8_3.model.cpp
index 8b99152..f8c3932 100644
--- a/nn/runtime/test/generated/models/max_pool_quant8_3.model.cpp
+++ b/nn/runtime/test/generated/models/max_pool_quant8_3.model.cpp
@@ -21,7 +21,7 @@
model->setOperandValue(relu1_activation, relu1_activation_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, relu1_activation}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{i0},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mobilenet_224_gender_basic_fixed.model.cpp b/nn/runtime/test/generated/models/mobilenet_224_gender_basic_fixed.model.cpp
index 4d7192d..f6a50b3 100644
--- a/nn/runtime/test/generated/models/mobilenet_224_gender_basic_fixed.model.cpp
+++ b/nn/runtime/test/generated/models/mobilenet_224_gender_basic_fixed.model.cpp
@@ -665,7 +665,7 @@
model->addOperation(ANEURALNETWORKS_CONV_2D, {op81, op84, op83, pad0, pad0, pad0, pad0, b215, b216, b217}, {op82});
model->addOperation(ANEURALNETWORKS_LOGISTIC, {op82}, {op85});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op86},
{op85});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mobilenet_quantized.model.cpp b/nn/runtime/test/generated/models/mobilenet_quantized.model.cpp
index d136def..0b65a17 100644
--- a/nn/runtime/test/generated/models/mobilenet_quantized.model.cpp
+++ b/nn/runtime/test/generated/models/mobilenet_quantized.model.cpp
@@ -707,7 +707,7 @@
model->addOperation(ANEURALNETWORKS_RESHAPE, {op28, op86}, {op85});
model->addOperation(ANEURALNETWORKS_SOFTMAX, {op85, b235}, {op87});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op88},
{op87});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mul.model.cpp b/nn/runtime/test/generated/models/mul.model.cpp
index febb0db..9ab5c9a 100644
--- a/nn/runtime/test/generated/models/mul.model.cpp
+++ b/nn/runtime/test/generated/models/mul.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MUL, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mul_broadcast_quant8.model.cpp b/nn/runtime/test/generated/models/mul_broadcast_quant8.model.cpp
index 63a608f..06917ef 100644
--- a/nn/runtime/test/generated/models/mul_broadcast_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/mul_broadcast_quant8.model.cpp
@@ -14,7 +14,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MUL, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mul_quant8.model.cpp b/nn/runtime/test/generated/models/mul_quant8.model.cpp
index 9654064..5670845 100644
--- a/nn/runtime/test/generated/models/mul_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/mul_quant8.model.cpp
@@ -13,7 +13,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MUL, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/mul_relu.model.cpp b/nn/runtime/test/generated/models/mul_relu.model.cpp
index 07e8f45..ece7fd0 100644
--- a/nn/runtime/test/generated/models/mul_relu.model.cpp
+++ b/nn/runtime/test/generated/models/mul_relu.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_MUL, {op1, op2, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu1_float_1.model.cpp b/nn/runtime/test/generated/models/relu1_float_1.model.cpp
index 795ce5a..7bb424e 100644
--- a/nn/runtime/test/generated/models/relu1_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu1_float_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU1, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu1_float_2.model.cpp b/nn/runtime/test/generated/models/relu1_float_2.model.cpp
index 84f6664..cbf2e7d 100644
--- a/nn/runtime/test/generated/models/relu1_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu1_float_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU1, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu1_quant8_1.model.cpp b/nn/runtime/test/generated/models/relu1_quant8_1.model.cpp
index 2dff2be..905c87b 100644
--- a/nn/runtime/test/generated/models/relu1_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu1_quant8_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU1, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu1_quant8_2.model.cpp b/nn/runtime/test/generated/models/relu1_quant8_2.model.cpp
index 66d741f..8e58e33 100644
--- a/nn/runtime/test/generated/models/relu1_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu1_quant8_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU1, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu6_float_1.model.cpp b/nn/runtime/test/generated/models/relu6_float_1.model.cpp
index 50ec1ff..45c632b 100644
--- a/nn/runtime/test/generated/models/relu6_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu6_float_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU6, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu6_float_2.model.cpp b/nn/runtime/test/generated/models/relu6_float_2.model.cpp
index d407ac6..c59232b 100644
--- a/nn/runtime/test/generated/models/relu6_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu6_float_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU6, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu6_quant8_1.model.cpp b/nn/runtime/test/generated/models/relu6_quant8_1.model.cpp
index c6bc0c0..7be2b9a 100644
--- a/nn/runtime/test/generated/models/relu6_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu6_quant8_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU6, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu6_quant8_2.model.cpp b/nn/runtime/test/generated/models/relu6_quant8_2.model.cpp
index f5547e8..87b17cc 100644
--- a/nn/runtime/test/generated/models/relu6_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu6_quant8_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU6, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu_float_1.model.cpp b/nn/runtime/test/generated/models/relu_float_1.model.cpp
index 7988371..f2a2718 100644
--- a/nn/runtime/test/generated/models/relu_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu_float_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu_float_2.model.cpp b/nn/runtime/test/generated/models/relu_float_2.model.cpp
index cfc0ec1..13e8575 100644
--- a/nn/runtime/test/generated/models/relu_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu_float_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu_quant8_1.model.cpp b/nn/runtime/test/generated/models/relu_quant8_1.model.cpp
index 082032e..e5ebe01 100644
--- a/nn/runtime/test/generated/models/relu_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/relu_quant8_1.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/relu_quant8_2.model.cpp b/nn/runtime/test/generated/models/relu_quant8_2.model.cpp
index ec98464..fefba7a 100644
--- a/nn/runtime/test/generated/models/relu_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/relu_quant8_2.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RELU, {input}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/reshape.model.cpp b/nn/runtime/test/generated/models/reshape.model.cpp
index 0456658..ec856e2 100644
--- a/nn/runtime/test/generated/models/reshape.model.cpp
+++ b/nn/runtime/test/generated/models/reshape.model.cpp
@@ -10,7 +10,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RESHAPE, {op1, op2}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/reshape_quant8.model.cpp b/nn/runtime/test/generated/models/reshape_quant8.model.cpp
index 19f30cc..afaf5bb 100644
--- a/nn/runtime/test/generated/models/reshape_quant8.model.cpp
+++ b/nn/runtime/test/generated/models/reshape_quant8.model.cpp
@@ -10,7 +10,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RESHAPE, {op1, op2}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/resize_bilinear.model.cpp b/nn/runtime/test/generated/models/resize_bilinear.model.cpp
index 4f7303b..97cf32c 100644
--- a/nn/runtime/test/generated/models/resize_bilinear.model.cpp
+++ b/nn/runtime/test/generated/models/resize_bilinear.model.cpp
@@ -15,7 +15,7 @@
model->setOperandValue(height, height_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_RESIZE_BILINEAR, {op1, width, height}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/rnn.model.cpp b/nn/runtime/test/generated/models/rnn.model.cpp
index a5788c6..867efc1 100644
--- a/nn/runtime/test/generated/models/rnn.model.cpp
+++ b/nn/runtime/test/generated/models/rnn.model.cpp
@@ -18,7 +18,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_RNN, {input, weights, recurrent_weights, bias, hidden_state_in, activation_param}, {hidden_state_out, output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input, weights, recurrent_weights, bias, hidden_state_in, activation_param},
{hidden_state_out, output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/softmax_float_1.model.cpp b/nn/runtime/test/generated/models/softmax_float_1.model.cpp
index a91b055..d189002 100644
--- a/nn/runtime/test/generated/models/softmax_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/softmax_float_1.model.cpp
@@ -11,7 +11,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_SOFTMAX, {input, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/softmax_float_2.model.cpp b/nn/runtime/test/generated/models/softmax_float_2.model.cpp
index 52c6ab4..8f575cf 100644
--- a/nn/runtime/test/generated/models/softmax_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/softmax_float_2.model.cpp
@@ -11,7 +11,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_SOFTMAX, {input, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/softmax_quant8_1.model.cpp b/nn/runtime/test/generated/models/softmax_quant8_1.model.cpp
index 15d7084..4e7eb8a 100644
--- a/nn/runtime/test/generated/models/softmax_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/softmax_quant8_1.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_SOFTMAX, {input, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/softmax_quant8_2.model.cpp b/nn/runtime/test/generated/models/softmax_quant8_2.model.cpp
index c818162..e24d6f2 100644
--- a/nn/runtime/test/generated/models/softmax_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/softmax_quant8_2.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(beta, beta_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_SOFTMAX, {input, beta}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/space_to_depth_float_1.model.cpp b/nn/runtime/test/generated/models/space_to_depth_float_1.model.cpp
index 203f439..95e6df9 100644
--- a/nn/runtime/test/generated/models/space_to_depth_float_1.model.cpp
+++ b/nn/runtime/test/generated/models/space_to_depth_float_1.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_SPACE_TO_DEPTH, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/space_to_depth_float_2.model.cpp b/nn/runtime/test/generated/models/space_to_depth_float_2.model.cpp
index 0b2154d..811efe7 100644
--- a/nn/runtime/test/generated/models/space_to_depth_float_2.model.cpp
+++ b/nn/runtime/test/generated/models/space_to_depth_float_2.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_SPACE_TO_DEPTH, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/space_to_depth_quant8_1.model.cpp b/nn/runtime/test/generated/models/space_to_depth_quant8_1.model.cpp
index fc3c8e0..8f0dbad 100644
--- a/nn/runtime/test/generated/models/space_to_depth_quant8_1.model.cpp
+++ b/nn/runtime/test/generated/models/space_to_depth_quant8_1.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_SPACE_TO_DEPTH, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/space_to_depth_quant8_2.model.cpp b/nn/runtime/test/generated/models/space_to_depth_quant8_2.model.cpp
index 060c611..7bd289d 100644
--- a/nn/runtime/test/generated/models/space_to_depth_quant8_2.model.cpp
+++ b/nn/runtime/test/generated/models/space_to_depth_quant8_2.model.cpp
@@ -12,7 +12,7 @@
model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_SPACE_TO_DEPTH, {input, radius}, {output});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input},
{output});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/svdf.model.cpp b/nn/runtime/test/generated/models/svdf.model.cpp
index 074ec77..41533c2 100644
--- a/nn/runtime/test/generated/models/svdf.model.cpp
+++ b/nn/runtime/test/generated/models/svdf.model.cpp
@@ -20,7 +20,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_SVDF, {input, weights_feature, weights_time, bias, state_in, rank_param, activation_param}, {output, state_out});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{input, weights_feature, weights_time, bias, state_in, rank_param, activation_param},
{output, state_out});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/models/tanh.model.cpp b/nn/runtime/test/generated/models/tanh.model.cpp
index 71a2af6..bc3cd4a 100644
--- a/nn/runtime/test/generated/models/tanh.model.cpp
+++ b/nn/runtime/test/generated/models/tanh.model.cpp
@@ -7,7 +7,7 @@
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_TANH, {op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/runtime/test/generated/vts_models/l2_normalization_large.model.cpp b/nn/runtime/test/generated/vts_models/l2_normalization_large.model.cpp
new file mode 100644
index 0000000..be588d3
--- /dev/null
+++ b/nn/runtime/test/generated/vts_models/l2_normalization_large.model.cpp
@@ -0,0 +1,51 @@
+// Generated code. Do not edit
+// Create the model
+Model createTestModel() {
+ const std::vector<Operand> operands = {
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 2, 2, 3},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 2, 2, 3},
+ .numberOfConsumers = 0,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_OUTPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ }
+ };
+
+ const std::vector<Operation> operations = {
+ {
+ .type = OperationType::L2_NORMALIZATION,
+ .inputs = {0},
+ .outputs = {1},
+ }
+ };
+
+ const std::vector<uint32_t> inputIndexes = {0};
+ const std::vector<uint32_t> outputIndexes = {1};
+ std::vector<uint8_t> operandValues = {};
+ const std::vector<hidl_memory> pools = {};
+
+ return {
+ .operands = operands,
+ .operations = operations,
+ .inputIndexes = inputIndexes,
+ .outputIndexes = outputIndexes,
+ .operandValues = operandValues,
+ .pools = pools,
+ };
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}
diff --git a/nn/runtime/test/generated/vts_models/l2_pool_float_large.model.cpp b/nn/runtime/test/generated/vts_models/l2_pool_float_large.model.cpp
new file mode 100644
index 0000000..8789aad
--- /dev/null
+++ b/nn/runtime/test/generated/vts_models/l2_pool_float_large.model.cpp
@@ -0,0 +1,107 @@
+// Generated code. Do not edit
+// Create the model
+Model createTestModel() {
+ const std::vector<Operand> operands = {
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 2, 2, 3},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 0, .length = 4},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 4, .length = 4},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 8, .length = 4},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 12, .length = 4},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 16, .length = 4},
+ },
+ {
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::CONSTANT_COPY,
+ .location = {.poolIndex = 0, .offset = 20, .length = 4},
+ },
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 1, 1, 3},
+ .numberOfConsumers = 0,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_OUTPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ }
+ };
+
+ const std::vector<Operation> operations = {
+ {
+ .type = OperationType::L2_POOL_2D,
+ .inputs = {0, 5, 5, 5, 5, 3, 4, 1, 2, 6},
+ .outputs = {7},
+ }
+ };
+
+ const std::vector<uint32_t> inputIndexes = {0};
+ const std::vector<uint32_t> outputIndexes = {7};
+ std::vector<uint8_t> operandValues = {
+ 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ const std::vector<hidl_memory> pools = {};
+
+ return {
+ .operands = operands,
+ .operations = operations,
+ .inputIndexes = inputIndexes,
+ .outputIndexes = outputIndexes,
+ .operandValues = operandValues,
+ .pools = pools,
+ };
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}
diff --git a/nn/runtime/test/generated/vts_models/lstm.model.cpp b/nn/runtime/test/generated/vts_models/lstm.model.cpp
index 68bbebb..61a1968 100644
--- a/nn/runtime/test/generated/vts_models/lstm.model.cpp
+++ b/nn/runtime/test/generated/vts_models/lstm.model.cpp
@@ -165,6 +165,24 @@
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 4},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 4},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
.type = OperandType::TENSOR_INT32,
.dimensions = {1},
.numberOfConsumers = 1,
@@ -232,13 +250,13 @@
const std::vector<Operation> operations = {
{
.type = OperationType::LSTM,
- .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20},
- .outputs = {24, 21, 22, 23},
+ .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22},
+ .outputs = {24, 25, 26, 23},
}
};
- const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
- const std::vector<uint32_t> outputIndexes = {24, 21, 22, 23};
+ const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22};
+ const std::vector<uint32_t> outputIndexes = {24, 25, 26, 23};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
@@ -253,6 +271,6 @@
}
bool is_ignored(int i) {
- static std::set<int> ignore = {0, 1, 2};
+ static std::set<int> ignore = {1, 2, 0};
return ignore.find(i) != ignore.end();
}
diff --git a/nn/runtime/test/generated/vts_models/lstm2.model.cpp b/nn/runtime/test/generated/vts_models/lstm2.model.cpp
index 620129d..6634acf 100644
--- a/nn/runtime/test/generated/vts_models/lstm2.model.cpp
+++ b/nn/runtime/test/generated/vts_models/lstm2.model.cpp
@@ -165,6 +165,24 @@
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 4},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {1, 4},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
.type = OperandType::TENSOR_INT32,
.dimensions = {1},
.numberOfConsumers = 1,
@@ -232,13 +250,13 @@
const std::vector<Operation> operations = {
{
.type = OperationType::LSTM,
- .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20},
- .outputs = {24, 21, 22, 23},
+ .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22},
+ .outputs = {24, 25, 26, 23},
}
};
- const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
- const std::vector<uint32_t> outputIndexes = {24, 21, 22, 23};
+ const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22};
+ const std::vector<uint32_t> outputIndexes = {24, 25, 26, 23};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
@@ -253,6 +271,6 @@
}
bool is_ignored(int i) {
- static std::set<int> ignore = {0, 1, 2};
+ static std::set<int> ignore = {1, 2, 0};
return ignore.find(i) != ignore.end();
}
diff --git a/nn/runtime/test/generated/vts_models/lstm3.model.cpp b/nn/runtime/test/generated/vts_models/lstm3.model.cpp
index 7b7b68f..ed70a33 100644
--- a/nn/runtime/test/generated/vts_models/lstm3.model.cpp
+++ b/nn/runtime/test/generated/vts_models/lstm3.model.cpp
@@ -165,6 +165,24 @@
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {2, 16},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {2, 20},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
.type = OperandType::TENSOR_INT32,
.dimensions = {1},
.numberOfConsumers = 1,
@@ -232,13 +250,13 @@
const std::vector<Operation> operations = {
{
.type = OperationType::LSTM,
- .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20},
- .outputs = {24, 21, 22, 23},
+ .inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22},
+ .outputs = {24, 25, 26, 23},
}
};
- const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
- const std::vector<uint32_t> outputIndexes = {24, 21, 22, 23};
+ const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22};
+ const std::vector<uint32_t> outputIndexes = {24, 25, 26, 23};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
@@ -253,6 +271,6 @@
}
bool is_ignored(int i) {
- static std::set<int> ignore = {0, 1, 2};
+ static std::set<int> ignore = {1, 2, 0};
return ignore.find(i) != ignore.end();
}
diff --git a/nn/runtime/test/generated/vts_models/rnn.model.cpp b/nn/runtime/test/generated/vts_models/rnn.model.cpp
index 0989463..b5f1c9b 100644
--- a/nn/runtime/test/generated/vts_models/rnn.model.cpp
+++ b/nn/runtime/test/generated/vts_models/rnn.model.cpp
@@ -39,6 +39,15 @@
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {2, 16},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
.type = OperandType::TENSOR_INT32,
.dimensions = {1},
.numberOfConsumers = 1,
@@ -70,13 +79,13 @@
const std::vector<Operation> operations = {
{
.type = OperationType::RNN,
- .inputs = {0, 1, 2, 3, 4},
- .outputs = {5, 6},
+ .inputs = {0, 1, 2, 3, 4, 5},
+ .outputs = {6, 7},
}
};
- const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4};
- const std::vector<uint32_t> outputIndexes = {5, 6};
+ const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5};
+ const std::vector<uint32_t> outputIndexes = {6, 7};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
diff --git a/nn/runtime/test/generated/vts_models/svdf.model.cpp b/nn/runtime/test/generated/vts_models/svdf.model.cpp
index cf08ceb..2fa8fbd 100644
--- a/nn/runtime/test/generated/vts_models/svdf.model.cpp
+++ b/nn/runtime/test/generated/vts_models/svdf.model.cpp
@@ -39,6 +39,15 @@
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
+ .type = OperandType::TENSOR_FLOAT32,
+ .dimensions = {2, 36},
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ },
+ {
.type = OperandType::TENSOR_INT32,
.dimensions = {1},
.numberOfConsumers = 1,
@@ -79,13 +88,13 @@
const std::vector<Operation> operations = {
{
.type = OperationType::SVDF,
- .inputs = {0, 1, 2, 3, 4, 5},
- .outputs = {6, 7},
+ .inputs = {0, 1, 2, 3, 4, 5, 6},
+ .outputs = {8, 7},
}
};
- const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5};
- const std::vector<uint32_t> outputIndexes = {6, 7};
+ const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6};
+ const std::vector<uint32_t> outputIndexes = {8, 7};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
diff --git a/nn/tools/test_generator/test_generator.py b/nn/tools/test_generator/test_generator.py
index 183ecaa..087032f 100755
--- a/nn/tools/test_generator/test_generator.py
+++ b/nn/tools/test_generator/test_generator.py
@@ -806,7 +806,7 @@
print (" // Phase 3, inputs and outputs", file=model_file)
inputs = Operand.print_operands(Input.get_inputs(True));
outputs = Operand.print_operands(Output.get_outputs());
- print (" model->setInputsAndOutputs(\n" +
+ print (" model->identifyInputsAndOutputs(\n" +
" {"+", ".join(inputs)+"},\n {" + ", ".join(outputs) + "});",
file=model_file)
# Boilerplate
diff --git a/nn/tools/test_generator/tests/P_conv/stdout.txt.expect b/nn/tools/test_generator/tests/P_conv/stdout.txt.expect
index 3b379aa..e9196f6 100644
--- a/nn/tools/test_generator/tests/P_conv/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_conv/stdout.txt.expect
@@ -29,7 +29,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, b4, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_depthwise_conv/stdout.txt.expect b/nn/tools/test_generator/tests/P_depthwise_conv/stdout.txt.expect
index 17d6fd0..6f8ea7c 100644
--- a/nn/tools/test_generator/tests/P_depthwise_conv/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_depthwise_conv/stdout.txt.expect
@@ -31,7 +31,7 @@
model->setOperandValue(op1, op1_init, sizeof(float) * 3);
model->addOperation(ANEURALNETWORKS_DEPTHWISE_CONV_2D, {op2, op0, op1, b4, b5, b6, b7, b8}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_explicit/stdout.txt.expect b/nn/tools/test_generator/tests/P_explicit/stdout.txt.expect
index 3bfc14f..1221b7b 100644
--- a/nn/tools/test_generator/tests/P_explicit/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_explicit/stdout.txt.expect
@@ -9,7 +9,7 @@
model->addOperation(ANEURALNETWORKS_ADD, {op1, op1}, {op0});
model->addOperation(ANEURALNETWORKS_ADD, {op0, op1}, {op2});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op2});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_float/stdout.txt.expect b/nn/tools/test_generator/tests/P_float/stdout.txt.expect
index 3e6db76..eb8cc14 100644
--- a/nn/tools/test_generator/tests/P_float/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_float/stdout.txt.expect
@@ -11,7 +11,7 @@
model->addOperation(ANEURALNETWORKS_ADD, {operand1, operand2}, {tmp4});
model->addOperation(ANEURALNETWORKS_ADD, {operand3, tmp4}, {operand4});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{operand1, operand2, operand3},
{operand4});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_full/stdout.txt.expect b/nn/tools/test_generator/tests/P_full/stdout.txt.expect
index c75232b..e3d2af3 100644
--- a/nn/tools/test_generator/tests/P_full/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_full/stdout.txt.expect
@@ -12,7 +12,7 @@
model->setOperandValue(b0, b0_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1, op2, b0}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1, op2},
{op3});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_quantized_avgpool/stdout.txt.expect b/nn/tools/test_generator/tests/P_quantized_avgpool/stdout.txt.expect
index 6f3dad2..b4632d3 100644
--- a/nn/tools/test_generator/tests/P_quantized_avgpool/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_quantized_avgpool/stdout.txt.expect
@@ -14,7 +14,7 @@
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_AVERAGE_POOL, {op1, cons1, cons1, cons1, cons1, cons1, act}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op1},
{op3});
assert(model->isValid());
diff --git a/nn/tools/test_generator/tests/P_quantized_conv/stdout.txt.expect b/nn/tools/test_generator/tests/P_quantized_conv/stdout.txt.expect
index cb03b5c..6b28bdd 100644
--- a/nn/tools/test_generator/tests/P_quantized_conv/stdout.txt.expect
+++ b/nn/tools/test_generator/tests/P_quantized_conv/stdout.txt.expect
@@ -28,7 +28,7 @@
model->setOperandValue(op1, op1_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_CONV_2D, {op2, op0, op1, b4, b5, b6, b7}, {op3});
// Phase 3, inputs and outputs
- model->setInputsAndOutputs(
+ model->identifyInputsAndOutputs(
{op2},
{op3});
assert(model->isValid());