Home | History | Annotate | Download | only in models
      1 // clang-format off
      2 // Generated file (from: floor_relaxed.mod.py). Do not edit
      3 void CreateModel(Model *model) {
      4   OperandType type0(Type::TENSOR_FLOAT32, {1, 2, 2, 2});
      5   // Phase 1, operands
      6   auto op1 = model->addOperand(&type0);
      7   auto op2 = model->addOperand(&type0);
      8   // Phase 2, operations
      9   model->addOperation(ANEURALNETWORKS_FLOOR, {op1}, {op2});
     10   // Phase 3, inputs and outputs
     11   model->identifyInputsAndOutputs(
     12     {op1},
     13     {op2});
     14   // Phase 4: set relaxed execution
     15   model->relaxComputationFloat32toFloat16(true);
     16   assert(model->isValid());
     17 }
     18 
     19 inline bool is_ignored(int i) {
     20   static std::set<int> ignore = {};
     21   return ignore.find(i) != ignore.end();
     22 }
     23 
     24 void CreateModel_dynamic_output_shape(Model *model) {
     25   OperandType type0(Type::TENSOR_FLOAT32, {1, 2, 2, 2});
     26   OperandType type1(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
     27   // Phase 1, operands
     28   auto op1 = model->addOperand(&type0);
     29   auto op2 = model->addOperand(&type1);
     30   // Phase 2, operations
     31   model->addOperation(ANEURALNETWORKS_FLOOR, {op1}, {op2});
     32   // Phase 3, inputs and outputs
     33   model->identifyInputsAndOutputs(
     34     {op1},
     35     {op2});
     36   // Phase 4: set relaxed execution
     37   model->relaxComputationFloat32toFloat16(true);
     38   assert(model->isValid());
     39 }
     40 
     41 inline bool is_ignored_dynamic_output_shape(int i) {
     42   static std::set<int> ignore = {};
     43   return ignore.find(i) != ignore.end();
     44 }
     45 
     46