summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96e08aa)
raw | patch | inline | side by side (parent: 96e08aa)
author | Slava Shklyaev <slavash@google.com> | |
Mon, 17 Sep 2018 11:03:42 +0000 (12:03 +0100) | ||
committer | Przemyslaw Szczepaniak <pszczepaniak@google.com> | |
Mon, 24 Sep 2018 12:31:03 +0000 (12:31 +0000) |
current.txt | patch | blob | history | |
neuralnetworks/1.0/types.hal | patch | blob | history | |
neuralnetworks/1.1/types.hal | patch | blob | history | |
neuralnetworks/1.2/types.hal | patch | blob | history |
diff --git a/current.txt b/current.txt
index 909732f19b17db61db75f7f87b8ae25e9ae1d0bf..88687af1a86f850ef25c681a0dee1ab9e7513f09 100644 (file)
--- a/current.txt
+++ b/current.txt
@@ -387,8 +387,10 @@ cd4330c3196bda1d642a32abfe23a7d64ebfbda721940643af6867af3b3f0aa9 android.hardwar
# ABI preserving changes to HALs during Android Q
da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardware.configstore@1.0::ISurfaceFlingerConfigs
574e8f1499436fb4075894dcae0b36682427956ecb114f17f1fe22d116a83c6b android.hardware.neuralnetworks@1.0::IPreparedModel
-1a5ae9793223658174258b523763c557abad6fb917df0b8e3cc097fc89035811 android.hardware.neuralnetworks@1.0::types
-4310eb8272f085914952f3bfb73a8f8bb477a80e8b93596f0ea5acb58546b66d android.hardware.neuralnetworks@1.1::types
+1fb32361286b938d48a55c2539c846732afce0b99fe08590f556643125bc13d3 android.hardware.neuralnetworks@1.0::types
+e22e8135d061d0e9c4c1a70c25c19fdba10f4d3cda9795ef25b6392fc520317c android.hardware.neuralnetworks@1.1::types
+810b03825c633b21982871a8aa690db94285947fca71881de71bf293ad0aa9c5 android.hardware.neuralnetworks@1.2::types
+79f3820a02f37bb0f84bca1a07900fd5bd819ec5a60ed14b205e1dc5e24a51b2 android.hardware.neuralnetworks@1.2::IDevice
1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse
271187e261b30c01a33011aea257c07a2d2f05b72943ebee89e973e997849973 android.hardware.radio@1.0::types
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
index 887fdf1b845530f21789f45d088d15b655ff145c..0880b2f0d7e681e32d3dff63cce77a224c2213ef 100644 (file)
* The type of an operation in a model.
*/
enum OperationType : int32_t {
+
/**
* Adds two tensors, element-wise.
*
*
* Outputs:
* * 0: The sum, a tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 27.
*/
ADD = 0,
*
* The values in the output tensor are computed as:
*
- * output[batch, row, col, channel] =
- * sum_{i, j}(input[batch, row + i, col + j, channel]) / sum(1)
+ * output[b, i, j, channel] =
+ * sum_{di, dj}(
+ * input[b, strides[1] * i + di, strides[2] * j + dj, channel]
+ * ) / sum(1)
*
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT32}
*
* Outputs:
* * 0: The output 4-D tensor, of shape
- [batches, out_height, out_width, depth].
+ * [batches, out_height, out_width, depth].
+ *
+ * Available since API level 27.
*/
AVERAGE_POOL_2D = 1,
* Outputs:
* * 0: The output, a tensor of the same {@link OperandType} as the input
* tensors. The output shape is [D0, D1, ..., sum(Daxis(i)), ..., Dm].
+ *
+ * Available since API level 27.
*/
CONCATENATION = 2,
*
* The values in the output tensor are computed as:
*
- * output[batch, row, col, channel] =
- * sum_{i, j} (
- * input[batch, row + i, col + j, k] *
- * filter[channel, row + i, col + j, k] +
- * bias[channel]
- * )
+ * output[b, i, j, channel] =
+ * sum_{di, dj, k} (
+ * input[b, strides[1] * i + di, strides[2] * j + dj, k] *
+ * filter[channel, di, dj, k]
+ * ) + bias[channel]
*
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT32}
* * 4: An {@link OperandType::INT32} scalar, specifying the stride when
* walking through input in the ‘width’ dimension.
* * 5: An {@link OperandType::INT32} scalar, specifying the stride when
- * walking through input in the ‘height’ dimension.
+ * walking through input in the ‘height’ dimension.
* * 6: An {@link OperandType::INT32} scalar, and has to be one of the
* {@link FusedActivationFunc} values. Specifies the activation to
* invoke on the result.
* [batches, out_height, out_width, depth_out]. For output tensor of
* {@link OperandType::TENSOR_QUANT8_ASYMM}, the following condition
* must be satisfied: output_scale > input_scale * filter_scale.
+ *
+ * Available since API level 27.
*/
CONV_2D = 3,
* sum_{di, dj} (
* input[b, strides[1] * i + di, strides[2] * j + dj, k] *
* filter[1, di, dj, k * channel_multiplier + q]
- * )
+ * ) + bias[k * channel_multiplier + q]
*
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT32}
* [batches, out_height, out_width, depth_out]. For output tensor of
* {@link OperandType::TENSOR_QUANT8_ASYMM}, the following condition
* must be satisfied: output_scale > input_scale * filter_scale.
+ *
+ * Available since API level 27.
*/
DEPTHWISE_CONV_2D = 4,
* Outputs:
* * 0: The output 4-D tensor, of shape [batch, height*block_size,
* width*block_size, depth/(block_size*block_size)].
+ *
+ * Available since API level 27.
*/
DEPTH_TO_SPACE = 5,
* Outputs:
* * 0: The output tensor of same shape as input0, but with
* {@link OperandType::TENSOR_FLOAT32}.
+ *
+ * Available since API level 27.
*/
DEQUANTIZE = 6,
* * 0: A n-D tensor with the same rank and shape as the Values
* tensor, except for the first dimension which has the same size
* as Lookups' only dimension.
+ *
+ * Available since API level 27.
*/
EMBEDDING_LOOKUP = 7,
* Outputs:
* * 0: The output tensor, of the same {@link OperandType} and dimensions as
* the input tensor.
+ *
+ * Available since API level 27.
*/
FLOOR = 8,
* tensor of {@link OperandType::TENSOR_QUANT8_ASYMM}, the following
* condition must be satisfied:
* output_scale > input_scale * filter_scale.
+ *
+ * Available since API level 27.
*/
FULLY_CONNECTED = 9,
* Stored as {@link OperandType::TENSOR_QUANT8_ASYMM} with offset 0
* and scale 1.0f.
* A non-zero byte represents True, a hit. A zero indicates otherwise.
+ *
+ * Available since API level 27.
*/
HASHTABLE_LOOKUP = 10,
* Outputs:
* * 0: The output 4-D tensor, of the same shape as input
* [batches, height, width, depth].
+ *
+ * Available since API level 27.
*/
L2_NORMALIZATION = 11,
*
* The values in the output tensor are computed as:
*
- * output[batch, row, col, channel] =
- * sqrt(sum_{i, j} pow(input[batch, row + i, col + j, channel], 2) /
+ * output[b, i, j, c] =
+ * sqrt(sum_{di, dj} pow(input[b, strides[1] * i + di, strides[2] * j + dj, c], 2) /
* sum(1))
*
* Supported tensor {@link OperandType}:
* Outputs:
* * 0: The output 4-D tensor, of shape
* [batches, out_height, out_width, depth].
+ *
+ * Available since API level 27.
*/
L2_POOL_2D = 12,
*
* Outputs:
* * 0: The output tensor of same shape as input0.
+ *
+ * Available since API level 27.
*/
LOCAL_RESPONSE_NORMALIZATION = 13,
* * 0: The output tensor of same shape as input0.
* For {@link OperandType::TENSOR_QUANT8_ASYMM},
* the scale must be 1.f / 256 and the zeroPoint must be 0.
+ *
+ * Available since API level 27.
*/
LOGISTIC = 14,
* If the projection type is Dense:
* Output.Dim == { Tensor[0].Dim[0] * Tensor[0].Dim[1] }
* A flattened tensor that represents projected bit vectors.
+ *
+ * Available since API level 27.
*/
LSH_PROJECTION = 15,
* A 2-D tensor of {@link OperandType::TENSOR_FLOAT32}, of shape
* [batch_size, output_size]. This is effectively the same as the
* current “output state (out)” value.
+ *
+ * Available since API level 27.
*/
LSTM = 16,
*
* The values in the output tensor are computed as:
*
- * output[batch, row, col, channel] =
- * max_{i, j} (input[batch, row + i, col + j, channel])
+ * output[b, i, j, channel] =
+ * max_{di, dj} (
+ * input[b, strides[1] * i + di, strides[2] * j + dj, channel]
+ * )
*
* Supported tensor {@link OperandType}:
* * {@link OperandType::TENSOR_FLOAT32}
* Outputs:
* * 0: The output 4-D tensor, of shape
* [batches, out_height, out_width, depth].
+ *
+ * Available since API level 27.
*/
MAX_POOL_2D = 17,
* For output tensor of {@link OperandType::TENSOR_QUANT8_ASYMM},
* the following condition must be satisfied:
* output_scale > input1_scale * input2_scale.
+ *
+ * Available since API level 27.
*/
MUL = 18,
*
* Outputs:
* * 0: The output tensor of same shape as input0.
+ *
+ * Available since API level 27.
*/
RELU = 19,
*
* Outputs:
* * 0: The output tensor of same shape as input0.
+ *
+ * Available since API level 27.
*/
RELU1 = 20,
*
* Outputs:
* * 0: The output tensor of same shape as input0.
+ *
+ * Available since API level 27.
*/
RELU6 = 21,
*
* Outputs:
* * 0: The output tensor, of shape specified by the input shape.
+ *
+ * Available since API level 27.
*/
RESHAPE = 22,
* Outputs:
* * 0: The output 4-D tensor, of shape
* [batches, new_height, new_width, depth].
+ *
+ * Available since API level 27.
*/
RESIZE_BILINEAR = 23,
* A 2-D tensor of {@link OperandType::TENSOR_FLOAT32}, of shape
* [batch_size, num_units]. This is effectively the same as the
* current state value.
+ *
+ * Available since API level 27.
*/
RNN = 24,
* * 0: The output tensor of same shape as input0.
* For {@link OperandType::TENSOR_QUANT8_ASYMM},
* the scale must be 1.f / 256 and the zeroPoint must be 0.
+ *
+ * Available since API level 27.
*/
SOFTMAX = 25,
* Outputs:
* * 0: The output 4-D tensor, of shape [batches, height/block_size,
* width/block_size, depth_in*block_size*block_size].
+ *
+ * Available since API level 27.
*/
SPACE_TO_DEPTH = 26,
* [batch_size, (memory_size - 1) * num_units * rank].
* * 1: output.
* A 2-D tensor of {@link OperandType::TENSOR_FLOAT32}, of shape
- * [batch_size, num_units].
+ * [batch_size, num_units].
+ *
+ * Available since API level 27.
*/
SVDF = 27,
*
* Outputs:
* * 0: The output tensor of same shape as input0.
+ *
+ * Available since API level 27.
*/
TANH = 28,
index 7b2a21a8c8fa762dc68c5ebad40297aa4f2a6bb8..c9de76b278fbd1b3600b0d8a6de3cf9ba825a827 100644 (file)
* The type of an operation in a model.
*/
enum OperationType : @1.0::OperationType {
+
/**
* BatchToSpace for N-dimensional tensors.
*
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
BATCH_TO_SPACE_ND = 29,
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
DIV = 30,
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
MEAN = 31,
* of the padding:
* output0.dimension[i] =
* padding[i, 0] + input0.dimension[i] + padding[i, 1]
+ *
+ * Available since API level 28.
*/
PAD = 32,
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
SPACE_TO_BATCH_ND = 33,
* * 0: A tensor of the same {@link OperandType} as input0. Contains the
* same data as input, but has one or more dimensions of size 1
* removed.
+ *
+ * Available since API level 28.
*/
SQUEEZE = 34,
*
* Inputs:
* * 0: An n-D tensor, specifying the tensor to be sliced.
- * * 1: A 1-D Tensor of {@link OperandType::TENSOR_INT32}, the starts of
- * the dimensions of the input tensor to be sliced. The length must be
- * of rank(input0).
- * * 2: A 1-D Tensor of {@link OperandType::TENSOR_INT32}, the ends of
- * the dimensions of the input tensor to be sliced. The length must be
- * of rank(input0).
- * * 3: A 1-D Tensor of {@link OperandType::TENSOR_INT32}, the strides of
- * the dimensions of the input tensor to be sliced. The length must be
- * of rank(input0).
- * * 4: An {@link OperandType::INT32} scalar, begin_mask. If the ith bit
+ * * 1: begin, a 1-D tensor of {@link OperandType::TENSOR_INT32}. The
+ * starts of the dimensions of the input tensor to be sliced. The
+ * length must be of rank(input0).
+ * * 2: end, a 1-D tensor of {@link OperandType::TENSOR_INT32}. The
+ * ends of the dimensions of the input tensor to be sliced. The length
+ * must be of rank(input0).
+ * * 3: strides, a 1-D tensor of {@link OperandType::TENSOR_INT32}. The
+ * strides of the dimensions of the input tensor to be sliced. The
+ * length must be of rank(input0). The entries must be non-zero.
+ * * 4: begin_mask, an {@link OperandType::INT32} scalar. If the ith bit
* of begin_mask is set, begin[i] is ignored and the fullest possible
* range in that dimension is used instead.
- * * 5: An {@link OperandType::INT32} scalar, end_mask. If the ith bit of
+ * * 5: end_mask, an {@link OperandType::INT32} scalar. If the ith bit of
* end_mask is set, end[i] is ignored and the fullest possible range in
* that dimension is used instead.
- * * 6: An {@link OperandType::INT32} scalar, shrink_axis_mask. An int32
- * mask. If the ith bit of shrink_axis_mask is set, it implies that the
- * ith specification shrinks the dimensionality by 1. A slice of size 1
- * starting from begin[i] in the dimension must be preserved.
+ * * 6: shrink_axis_mask, an {@link OperandType::INT32} scalar. If the
+ * ith bit of shrink_axis_mask is set, the ith dimension specification
+ * shrinks the dimensionality by 1, taking on the value at index
+ * begin[i]. In this case, the ith specification must define a
+ * slice of size 1, e.g. begin[i] = x, end[i] = x + 1.
*
* Outputs:
- * * 0: A tensor of the same {@link OperandType} as input0.
+ * * 0: A tensor of the same {@link OperandType} as input0 and rank (n - k),
+ * where k is the number of bits set in shrink_axis_mask.
+ *
+ * Available since API level 28.
*/
STRIDED_SLICE = 35,
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
SUB = 36,
*
* Outputs:
* * 0: A tensor of the same {@link OperandType} as input0.
+ *
+ * Available since API level 28.
*/
TRANSPOSE = 37,
+
};
/**
index 06606cc33005e1388ed414ad1f4bb67ce1e440e4..61970f00fdf570b852d285c268d5336a3223fa50 100644 (file)
* The type of an operation in a model.
*/
enum OperationType : @1.1::OperationType {
+
};
/**