1 // Generated file (from: embedding_lookup_relaxed.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3   OperandType type1(Type::TENSOR_FLOAT32, {3, 2, 4});
4   OperandType type0(Type::TENSOR_INT32, {3});
5   // Phase 1, operands
6   auto index = model->addOperand(&type0);
7   auto value = model->addOperand(&type1);
8   auto output = model->addOperand(&type1);
9   // Phase 2, operations
10   model->addOperation(ANEURALNETWORKS_EMBEDDING_LOOKUP, {index, value}, {output});
11   // Phase 3, inputs and outputs
12   model->identifyInputsAndOutputs(
13     {index, value},
14     {output});
15   // Phase 4: set relaxed execution
16   model->relaxComputationFloat32toFloat16(true);
17   assert(model->isValid());
18 }
19 
is_ignored(int i)20 bool is_ignored(int i) {
21   static std::set<int> ignore = {};
22   return ignore.find(i) != ignore.end();
23 }
24