blob: c9f923746a29499a9fe6cd37d38a4ef8c02ba857 [file] [log] [blame]
// Generated from gather_higher_rank.mod.py
// DO NOT EDIT
// clang-format off
#include "TestHarness.h"
using namespace test_helper;
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model() {
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}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({5.0f, 6.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 1.0f, 2.0f, 3.0f, 4.0f}),
.dimensions = {1, 3, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 4},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({5.0f, 6.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 1.0f, 2.0f, 3.0f, 4.0f}),
.dimensions = {1, 3, 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}),
.dimensions = {1, 3, 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 = {4, 5, 6},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_relaxed() {
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}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({5.0f, 6.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 1.0f, 2.0f, 3.0f, 4.0f}),
.dimensions = {1, 3, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 4},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({5.0f, 6.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 1.0f, 2.0f, 3.0f, 4.0f}),
.dimensions = {1, 3, 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}),
.dimensions = {1, 3, 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 = {4, 5, 6},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_quant8() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({137, 139, 129, 131, 133, 135, 129, 131, 129, 131, 133, 135}),
.dimensions = {1, 3, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}},
.operations = {{
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_quant8_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {2, 4},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({137, 139, 129, 131, 133, 135, 129, 131, 129, 131, 133, 135}),
.dimensions = {1, 3, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({129, 131, 133, 135, 137, 139}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({127}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 127
}, {
.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 = {4, 5, 6},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank
namespace generated_tests::gather_higher_rank {
const TestModel& get_test_model_int32() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 2},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1, 2, 3, 4, 5, 6}),
.dimensions = {1, 3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({1}),
.dimensions = {},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({2, 0, 1, 0, 0, 1}),
.dimensions = {3, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4}),
.dimensions = {1, 3, 2, 2},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_INT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1, 2},
.outputs = {3},
.type = TestOperationType::GATHER
}},
.outputIndexes = {3}
};
return model;
}
} // namespace generated_tests::gather_higher_rank