blob: 1cf8ca77eb136fde32ef3ba73e6c16ba2cc0716c [file] [log] [blame]
// Generated from prelu.mod.py
// DO NOT EDIT
// clang-format off
#include "TestHarness.h"
using namespace test_helper;
namespace generated_tests::prelu {
const TestModel& get_test_model() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_relaxed() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_relaxed_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_relaxed_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = true,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT32,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<float>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 54, 58}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.125f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.125f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.125f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.125f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.25f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 128
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.1f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 120
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50, 52, 54}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<uint8_t>({50}),
.dimensions = {1},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.5f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM,
.zeroPoint = 50
}, {
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_float16() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_float16_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::CONSTANT_COPY,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_float16_all_tensors_as_inputs() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {0, 1},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_INPUT,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}},
.operations = {{
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu
namespace generated_tests::prelu {
const TestModel& get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal() {
static TestModel model = {
.expectedMultinomialDistributionTolerance = 0,
.inputIndexes = {3, 6},
.isRelaxed = false,
.operands = {{
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({}),
.dimensions = {1, 1, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
.numberOfConsumers = 1,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}),
.dimensions = {1, 2, 2, 3},
.isIgnored = false,
.lifetime = TestOperandLifeTime::MODEL_OUTPUT,
.numberOfConsumers = 0,
.scale = 0.0f,
.type = TestOperandType::TENSOR_FLOAT16,
.zeroPoint = 0
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}),
.dimensions = {1, 2, 2, 3},
.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
}, {
.channelQuant = {},
.data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}),
.dimensions = {1, 1, 3},
.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 = {3, 4, 5},
.outputs = {0},
.type = TestOperationType::ADD
}, {
.inputs = {6, 7, 8},
.outputs = {1},
.type = TestOperationType::ADD
}, {
.inputs = {0, 1},
.outputs = {2},
.type = TestOperationType::PRELU
}},
.outputIndexes = {2}
};
return model;
}
} // namespace generated_tests::prelu