blob: 123be6f82f22a7732fdebe6ba5251fda3e1426f3 [file] [log] [blame]
// clang-format off
// Generated file (from: hashtable_lookup_float_relaxed.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type0(Type::TENSOR_INT32, {4});
OperandType type1(Type::TENSOR_INT32, {3});
OperandType type2(Type::TENSOR_FLOAT32, {3, 2});
OperandType type3(Type::TENSOR_FLOAT32, {4, 2});
OperandType type4(Type::TENSOR_QUANT8_ASYMM, {4}, 1.0f, 0);
// Phase 1, operands
auto lookup = model->addOperand(&type0);
auto key = model->addOperand(&type1);
auto value = model->addOperand(&type2);
auto output = model->addOperand(&type3);
auto hits = model->addOperand(&type4);
// Phase 2, operations
model->addOperation(ANEURALNETWORKS_HASHTABLE_LOOKUP, {lookup, key, value}, {output, hits});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{lookup, key, value},
{output, hits});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
inline bool is_ignored(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}