blob: 68efb41c7ad3385fff798cf15502707a44d8bd19 [file] [log] [blame]
// Generated from not_equal.mod.py
// DO NOT EDIT
// clang-format off
#include "GeneratedTests.h"
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_int32() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_INT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_INT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_int32(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_int32_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_INT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_INT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_int32_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 2, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 2, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_all_inputs_as_internal() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_all_inputs_as_internal_dynamic_output_shape() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_int32_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_INT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_INT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_int32_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_int32_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_INT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_INT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_int32_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 2, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_float16_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 2, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT16,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 2},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_float16_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_all_inputs_as_internal_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {2, 2},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_relaxed_all_inputs_as_internal_dynamic_output_shape_2() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0, 0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2, 1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 4, .length = 4},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {2},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_FLOAT32,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 8, .length = 4},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 12, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
.relaxComputationFloat32toFloat16 = true,
};
}
bool is_ignored_relaxed_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
128, 0, 0, 0, 0, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape_3() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 2.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
128, 0, 0, 0, 0, 128, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_4() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_4() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_4() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {3},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
128, 0, 0, 0, 0, 129, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape_4() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {3},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.0f,
.zeroPoint = 129,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
128, 0, 0, 0, 0, 129, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_5() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_5() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_5() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
31, 0, 0, 0, 0, 240, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape_5() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
31, 0, 0, 0, 0, 240, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_6() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_6() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_6() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {1},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
240, 0, 0, 0, 0, 31, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_all_inputs_as_internal_dynamic_output_shape_6() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::TEMPORARY_VARIABLE,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.49725f,
.zeroPoint = 240,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 0, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 1, .length = 4},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {1},
.numberOfConsumers = 1,
.scale = 1.64771f,
.zeroPoint = 31,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 5, .length = 1},
},
{
.type = OperandType::INT32,
.dimensions = {},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::CONSTANT_COPY,
.location = {.poolIndex = 0, .offset = 6, .length = 4},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::ADD,
.inputs = {3, 4, 5},
.outputs = {0},
},
{
.type = OperationType::ADD,
.inputs = {6, 7, 8},
.outputs = {1},
},
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {3, 6};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {
240, 0, 0, 0, 0, 31, 0, 0, 0, 0
};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_all_inputs_as_internal_dynamic_output_shape_6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_7() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {4},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_7(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal
namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal {
Model createTestModel_dynamic_output_shape_7() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {4},
.numberOfConsumers = 1,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_BOOL8,
.dimensions = {0},
.numberOfConsumers = 0,
.scale = 0.0f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::NOT_EQUAL,
.inputs = {0, 1},
.outputs = {2},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1};
const std::vector<uint32_t> outputIndexes = {2};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
bool is_ignored_dynamic_output_shape_7(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace android::hardware::neuralnetworks::V1_2::generated_tests::not_equal