blob: 1edf35d119399cda7446524d73ce2c6e691e5965 [file] [log] [blame]
// clang-format off
// Generated file (from: concat_mixed_quant.mod.py). Do not edit
// Create the model
Model createTestModel_quant8() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.084f,
.zeroPoint = 127,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.05f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.089f,
.zeroPoint = 123,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.029f,
.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::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 8},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 127,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::CONCATENATION,
.inputs = {0, 1, 2, 3, 4},
.outputs = {5},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3};
const std::vector<uint32_t> outputIndexes = {5};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
inline bool is_ignored_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
// Create the model
Model createTestModel_quant8_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.084f,
.zeroPoint = 127,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.05f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.089f,
.zeroPoint = 123,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 2},
.numberOfConsumers = 1,
.scale = 0.029f,
.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::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0078125f,
.zeroPoint = 127,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::CONCATENATION,
.inputs = {0, 1, 2, 3, 4},
.outputs = {5},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3};
const std::vector<uint32_t> outputIndexes = {5};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
inline bool is_ignored_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}