summaryrefslogtreecommitdiff
path: root/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect')
-rw-r--r--tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect98
1 files changed, 98 insertions, 0 deletions
diff --git a/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect b/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect
new file mode 100644
index 000000000..2e271c712
--- /dev/null
+++ b/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_internal/stdout.txt.expect
@@ -0,0 +1,98 @@
+// clang-format off
+// Generated file (from: add_internal.mod.py). Do not edit
+// clang-format off
+// Generated file (from: add_internal.mod.py). Do not edit
+// clang-format off
+// Generated file (from: add_internal.mod.py). Do not edit
+#include "../../TestGenerated.h"
+
+namespace add_internal {
+// Generated add_internal test
+#include "-"
+// Generated model constructor
+#include "-"
+} // namespace add_internal
+
+void CreateModel(Model *model) {
+ OperandType type0(Type::TENSOR_FLOAT32, {2});
+ OperandType type1(Type::INT32, {});
+ // Phase 1, operands
+ auto o0 = model->addOperand(&type0);
+ auto o1 = model->addOperand(&type0);
+ auto act = model->addOperand(&type1);
+ auto o2 = model->addOperand(&type0);
+ auto p0 = model->addOperand(&type0);
+ auto t5 = model->addOperand(&type0);
+ auto t6 = model->addOperand(&type0);
+ auto i2 = model->addOperand(&type0);
+ auto t0 = model->addOperand(&type0);
+ auto t1 = model->addOperand(&type0);
+ auto i6 = model->addOperand(&type0);
+ auto i0 = model->addOperand(&type0);
+ auto i1 = model->addOperand(&type0);
+ auto t3 = model->addOperand(&type0);
+ auto t4 = model->addOperand(&type0);
+ auto t2 = model->addOperand(&type0);
+ auto i5 = model->addOperand(&type0);
+ auto i3 = model->addOperand(&type0);
+ auto i4 = model->addOperand(&type0);
+ auto i7 = model->addOperand(&type0);
+ auto i8 = model->addOperand(&type0);
+ // Phase 2, operations
+ static int32_t act_init[] = {0};
+ model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
+ static float p0_init[] = {0.0f, 1.0f};
+ model->setOperandValue(p0, p0_init, sizeof(float) * 2);
+ model->addOperation(ANEURALNETWORKS_ADD, {i6, p0, act}, {t5});
+ model->addOperation(ANEURALNETWORKS_ADD, {p0, t5, act}, {t6});
+ model->addOperation(ANEURALNETWORKS_ADD, {i0, i1, act}, {t0});
+ model->addOperation(ANEURALNETWORKS_ADD, {i2, t0, act}, {t1});
+ model->addOperation(ANEURALNETWORKS_ADD, {i3, i4, act}, {t2});
+ model->addOperation(ANEURALNETWORKS_ADD, {t2, i5, act}, {t3});
+ model->addOperation(ANEURALNETWORKS_ADD, {t1, t3, act}, {t4});
+ model->addOperation(ANEURALNETWORKS_ADD, {t4, t6, act}, {o0});
+ model->addOperation(ANEURALNETWORKS_ADD, {i7, i8, act}, {o1});
+ model->addOperation(ANEURALNETWORKS_ADD, {o0, o1, act}, {o2});
+ // Phase 3, inputs and outputs
+ model->identifyInputsAndOutputs(
+ {i2, i6, i0, i1, i5, i3, i4, i7, i8},
+ {o0, o1, o2});
+ assert(model->isValid());
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}
+
+std::vector<MixedTypedExample> examples = {
+// Begin of an example
+{
+//Input(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {0.0f, 0.0f}}, {1, {0.0f, 0.0f}}, {2, {0.0f, 0.0f}}, {3, {0.0f, 0.0f}}, {4, {0.0f, 0.0f}}, {5, {0.0f, 0.0f}}, {6, {0.0f, 0.0f}}, {7, {0.0f, 0.0f}}, {8, {0.0f, 0.0f}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+},
+//Output(s)
+{ // See tools/test_generator/include/TestHarness.h:MixedTyped
+ // int -> FLOAT32 map
+ {{0, {0.0f, 2.0f}}, {1, {0.0f, 0.0f}}, {2, {0.0f, 2.0f}}},
+ // int -> INT32 map
+ {},
+ // int -> QUANT8_ASYMM map
+ {}
+}
+}, // End of an example
+};
+
+TEST_F(GeneratedTests, add_internal) {
+ execute(add_internal::CreateModel,
+ add_internal::is_ignored,
+ add_internal::examples);
+}
+
+#include "../generated/tests/add_internal.mod.py.cpp"