blob: a56921f28799a1493901d9fee7b97f6c92d803d5 [file] [log] [blame]
// Generated from space_to_depth_v1_2.mod.py
// DO NOT EDIT
// clang-format off
#include "GeneratedTests.h"
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 1, 8},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 8, 1, 1},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 2},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.1f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 4},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 2, 2},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 1, 4, 4},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.5f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 2, 8},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 4, 4, 2},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 9, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 7, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {0};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 8, 2, 2},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2
namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2 {
Model createTestModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.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::BOOL,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 1},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {0, 0, 0, 0},
.numberOfConsumers = 0,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1, 2, 4, 4},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {4, 5, 6},
.outputs = {0},
},
{
.type = OperationType::SPACE_TO_DEPTH,
.inputs = {0, 1, 2},
.outputs = {3},
}
};
const std::vector<uint32_t> inputIndexes = {4};
const std::vector<uint32_t> outputIndexes = {3};
std::vector<uint8_t> operandValues = {
2, 0, 0, 0, 1, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::space_to_depth_v1_2