blob: 161fc81813214da8bd9c0146f72c5686ca23a5cc [file] [log] [blame]
// Generated from space_to_batch_v1_2.mod.py
// DO NOT EDIT
// clang-format off
#include "TestHarness.h"
using namespace test_helper;
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 1, 1, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 2.3f, 3.2f, 4.1f, 5.4f, 6.3f, 7.2f, 8.1f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.4f, 3.2f, 5.4f, 7.2f, 2.3f, 4.1f, 6.3f, 8.1f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 3.200000047683716f, 5.400000095367432f, 7.199999809265137f, 2.299999952316284f, 4.099999904632568f, 6.300000190734863f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 3.200000047683716f, 5.400000095367432f, 7.199999809265137f, 2.299999952316284f, 4.099999904632568f, 6.300000190734863f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 3.200000047683716f, 5.400000095367432f, 7.199999809265137f, 2.299999952316284f, 4.099999904632568f, 6.300000190734863f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 2.299999952316284f, 3.200000047683716f, 4.099999904632568f, 5.400000095367432f, 6.300000190734863f, 7.199999809265137f, 8.100000381469727f}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.399999976158142f, 3.200000047683716f, 5.400000095367432f, 7.199999809265137f, 2.299999952316284f, 4.099999904632568f, 6.300000190734863f, 8.100000381469727f}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 32, 54, 72, 23, 41, 63, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 32, 54, 72, 23, 41, 63, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 32, 54, 72, 23, 41, 63, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 23, 32, 41, 54, 63, 72, 81}),
.dimensions = {4, 2, 1, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({14, 32, 54, 72, 23, 41, 63, 81}),
.dimensions = {1, 2, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 4, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 3.0f, 9.0f, 11.0f, 2.0f, 4.0f, 10.0f, 12.0f, 5.0f, 7.0f, 13.0f, 15.0f, 6.0f, 8.0f, 14.0f, 16.0f}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0, 0, 0, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 6, 18, 22, 4, 8, 20, 24, 10, 14, 26, 30, 12, 16, 28, 32}),
.dimensions = {4, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}),
.dimensions = {1, 1, 4, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({0}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 2, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 5, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 1.0f, 0.0f, 7.0f, 0.0f, 2.0f, 0.0f, 8.0f, 0.0f, 3.0f, 0.0f, 9.0f, 0.0f, 4.0f, 0.0f, 10.0f}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 0, 2, 0}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 138, 128, 128, 128, 140, 128, 130, 128, 142, 128, 132, 128, 144, 128, 134, 128, 146, 128, 136, 128, 148}),
.dimensions = {6, 1, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({130, 132, 134, 136, 138, 140, 142, 144, 146, 148}),
.dimensions = {1, 1, 5, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({false}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 2, 4, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 4, 2, 1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 7.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 8.0f, 0.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}},
.operations = {{
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2
namespace generated_tests::space_to_batch_v1_2 {
const TestModel& get_test_model_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 5},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({3, 2}),
.dimensions = {2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 1, 2, 4}),
.dimensions = {2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<bool8>({true}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::BOOL,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 128, 128, 148, 128, 128, 128, 128, 128, 128, 128, 152, 128, 128, 128, 132, 128, 128, 128, 156, 128, 128, 128, 136, 128, 128, 128, 160, 128, 128, 128, 140, 128, 128, 128, 128, 128, 128, 128, 144, 128, 128, 128, 128, 128, 128}),
.dimensions = {6, 1, 2, 4},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({132, 136, 140, 144, 148, 152, 156, 160}),
.dimensions = {1, 1, 4, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {5, 6, 7},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2, 3},
.outputs = {4},
.type = TestOperationType::SPACE_TO_BATCH_ND
}},
.outputIndexes = {4}
};
return model;
}
} // namespace generated_tests::space_to_batch_v1_2