mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Add NNAPI 1.3 OperationType"
am: 2264258028
Change-Id: I2d4c53395d931aeeb9305d3f50e5e7297eef87bf
This commit is contained in:
@@ -597,8 +597,8 @@ adb0efdf1462e9b2e742c0dcadd598666aac551f178be06e755bfcdf5797abd0 android.hardwar
|
||||
9e59fffceed0dd72a9799e04505db5f777bbbea1af0695ba4107ef6d967c6fda android.hardware.neuralnetworks@1.3::IDevice
|
||||
4a6c3b3556da951b4def21ba579a227c022980fe4465df6cdfbe20628fa75f5a android.hardware.neuralnetworks@1.3::IPreparedModel
|
||||
94e803236398bed1febb11cc21051bc42ec003700139b099d6c479e02a7ca3c3 android.hardware.neuralnetworks@1.3::IPreparedModelCallback
|
||||
b74fe72cfe438f50e772e6a307657ff449d5bde83c15dd1f140ff2edbe73499c android.hardware.neuralnetworks@1.3::types
|
||||
c511b1427b1c3f76af90967bbddaaf250db983a8d3abb9ff189fb5a807cf3d4d android.hardware.neuralnetworks@1.3::types
|
||||
274fb1254a6d1a97824ec5c880eeefc0e410dc6d3a2a4c34052201169d2b7de0 android.hardware.radio@1.5::types
|
||||
c8e81d912827a5d49b2ddcdc4eb4556c5d231a899a1dca879309e04210daa4a0 android.hardware.radio@1.5::IRadio
|
||||
a62a93faf173b14a6175b683ebf61ffa568dc61f81e369d2dce7b1265e86cf2f android.hardware.radio@1.5::IRadioIndication
|
||||
260ce05806d753d728f844d405e832179ed7d9b65986ec18fef3d21cf7285587 android.hardware.radio@1.5::IRadioResponse
|
||||
260ce05806d753d728f844d405e832179ed7d9b65986ec18fef3d21cf7285587 android.hardware.radio@1.5::IRadioResponse
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,47 @@ enum OperandTypeRange : uint32_t {
|
||||
BASE_MAX = 0xFFFF,
|
||||
};
|
||||
|
||||
/**
|
||||
* Operation types.
|
||||
*
|
||||
* The type of an operation in a model.
|
||||
*/
|
||||
enum OperationType : int32_t {
|
||||
|
||||
%insert Operation_1.0
|
||||
|
||||
%insert Operation_1.1
|
||||
|
||||
%insert Operation_1.2
|
||||
|
||||
/**
|
||||
* DEPRECATED. Since NNAPI 1.2, extensions are the preferred alternative to
|
||||
* OEM operation and data types.
|
||||
*
|
||||
* This operation is OEM specific. It should only be used for OEM
|
||||
* applications.
|
||||
*/
|
||||
OEM_OPERATION = @1.2::OperationType:OEM_OPERATION,
|
||||
/* ADDING A NEW FUNDAMENTAL OPERATION REQUIRES UPDATING THE VALUE OF
|
||||
* OperationTypeRange::FUNDAMENTAL_MAX.
|
||||
*/
|
||||
/* ADDING A NEW OEM OPERATION REQUIRES UPDATING THE VALUE OF
|
||||
* OperationTypeRange::OEM_MAX.
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* The range of values in the OperationType enum.
|
||||
*/
|
||||
enum OperationTypeRange : uint32_t {
|
||||
BASE_MIN = 0,
|
||||
FUNDAMENTAL_MIN = 0,
|
||||
%insert Operation_1.3_MAX
|
||||
OEM_MIN = 10000,
|
||||
OEM_MAX = 10000,
|
||||
BASE_MAX = 0xFFFF,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The capabilities of a driver.
|
||||
@@ -79,6 +120,32 @@ struct Capabilities {
|
||||
vec<OperandPerformance> operandPerformance;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes one operation of the model's graph.
|
||||
*/
|
||||
struct Operation {
|
||||
/**
|
||||
* The operation type.
|
||||
*
|
||||
* Besides the values listed in {@link OperationType}, any value above
|
||||
* {@link OperationTypeRange::BASE_MAX} is possible and should be interpreted
|
||||
* as an extension type according to {@link Model::extensionNameToPrefix}.
|
||||
*/
|
||||
OperationType type;
|
||||
|
||||
/**
|
||||
* Describes the table that contains the indexes of the inputs of the
|
||||
* operation. The offset is the index in the operandIndexes table.
|
||||
*/
|
||||
vec<uint32_t> inputs;
|
||||
|
||||
/**
|
||||
* Describes the table that contains the indexes of the outputs of the
|
||||
* operation. The offset is the index in the operandIndexes table.
|
||||
*/
|
||||
vec<uint32_t> outputs;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes one operand of the model's graph.
|
||||
*/
|
||||
@@ -203,28 +270,6 @@ struct Operand {
|
||||
} extraParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes one operation of the model's graph.
|
||||
*/
|
||||
struct Operation {
|
||||
/**
|
||||
* The operation type.
|
||||
*/
|
||||
OperationType type;
|
||||
|
||||
/**
|
||||
* Describes the table that contains the indexes of the inputs of the
|
||||
* operation. The offset is the index in the operandIndexes table.
|
||||
*/
|
||||
vec<uint32_t> inputs;
|
||||
|
||||
/**
|
||||
* Describes the table that contains the indexes of the outputs of the
|
||||
* operation. The offset is the index in the operandIndexes table.
|
||||
*/
|
||||
vec<uint32_t> outputs;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Neural Network Model.
|
||||
*
|
||||
|
||||
@@ -63,7 +63,6 @@ using V1_0::Request;
|
||||
using V1_1::ExecutionPreference;
|
||||
using V1_2::Constant;
|
||||
using V1_2::MeasureTiming;
|
||||
using V1_2::OperationType;
|
||||
using V1_2::OutputShape;
|
||||
using V1_2::SymmPerChannelQuantParams;
|
||||
using V1_2::Timing;
|
||||
|
||||
@@ -25,8 +25,6 @@ using namespace test_helper;
|
||||
#define CHECK_TEST_ENUM(EnumType, enumValue) \
|
||||
static_assert(static_cast<EnumType>(Test##EnumType::enumValue) == EnumType::enumValue)
|
||||
|
||||
using V1_2::OperationType;
|
||||
|
||||
CHECK_TEST_ENUM(OperandType, FLOAT32);
|
||||
CHECK_TEST_ENUM(OperandType, INT32);
|
||||
CHECK_TEST_ENUM(OperandType, UINT32);
|
||||
|
||||
@@ -27,7 +27,6 @@ using implementation::PreparedModelCallback;
|
||||
using V1_0::ErrorStatus;
|
||||
using V1_0::OperandLifeTime;
|
||||
using V1_1::ExecutionPreference;
|
||||
using V1_2::OperationType;
|
||||
using V1_2::OperationTypeRange;
|
||||
using V1_2::SymmPerChannelQuantParams;
|
||||
using HidlToken =
|
||||
|
||||
Reference in New Issue
Block a user