Home
last modified time | relevance | path

Searched refs:shape (Results 1 – 25 of 103) sorted by relevance

12345

/aosp12/packages/modules/NeuralNetworks/common/
H A DCpuExecutor.cpp201 info->type = shape.type; in setInfoAndAllocateIfNeeded()
202 info->scale = shape.scale; in setInfoAndAllocateIfNeeded()
203 info->zeroPoint = shape.offset; in setInfoAndAllocateIfNeeded()
444 Shape inShape = from.shape(); in convertToNhwc()
950 success = embeddingLookupPrepare(values.shape(), lookups.shape(), &outputShape) && in executeOperation()
967 success = hashtableLookupPrepare(lookups.shape(), keys.shape(), values.shape(), in executeOperation()
1454 success = maximum_minimum::prepare(in1.shape(), in2.shape(), &outputShape) && in executeOperation()
1456 maximum_minimum::eval(in1.buffer, in1.shape(), in2.buffer, in2.shape(), in executeOperation()
1521 if (!groupedConvPrepare(input_tmp.shape(), filter.shape(), bias.shape(), padding_left, in executeOperation()
1642 success = pow::prepare(base.shape(), exponent.shape(), &outShape) && in executeOperation()
[all …]
H A DIndexedShapeWrapper.cpp28 IndexedShapeWrapper::IndexedShapeWrapper(const Shape& wrapped_shape) : shape(&wrapped_shape) { in IndexedShapeWrapper()
29 strides.resize(shape->dimensions.size()); in IndexedShapeWrapper()
32 strides[i] = shape->dimensions[i + 1] * strides[i + 1]; in IndexedShapeWrapper()
41 if (index->at(i) < shape->dimensions[i] - 1) { in nextIndexInplace()
52 if (index->at(i) == shape->dimensions[i]) { in nextIndexInplace()
79 uint32_t currentDimSize = shape->dimensions[shape->dimensions.size() - i]; in broadcastedIndexToFlatIndex()
89 if (index.size() != shape->dimensions.size()) { in isValid()
92 << toString(shape->dimensions); in isValid()
96 if (index[i] >= shape->dimensions[i]) { in isValid()
98 << " is out of range for shape: " << toString(shape->dimensions); in isValid()
/aosp12/packages/modules/NeuralNetworks/common/include/
H A DCpuOperationUtils.h35 inline tflite::Dims<4> convertShapeToDims(const Shape& shape) { in convertShapeToDims() argument
36 CHECK_LE(shape.dimensions.size(), 4u); in convertShapeToDims()
41 int src = static_cast<int>(shape.dimensions.size()) - i - 1; in convertShapeToDims()
57 std::vector<int32_t> tflShapeDim(shape.dimensions.begin(), shape.dimensions.end()); in convertShapeToTflshape()
162 bool initialize(const T* data, const Shape& shape) { in initialize() argument
164 mShape = shape; in initialize()
186 bool initialize(T* data, const Shape& shape) { in initialize() argument
187 NN_RET_CHECK_EQ(getNumberOfDimensions(shape), 4); in initialize()
189 mShape = shape; in initialize()
191 const auto& dim = shape.dimensions; in initialize()
[all …]
H A DOperationsUtils.h131 uint32_t getNumberOfElements(const Shape& shape);
135 uint32_t getNumberOfDimensions(const Shape& shape);
139 uint32_t hasKnownRank(const Shape& shape);
327 const int numDims = getNumberOfDimensions(shape); in transposeFirstTwoDimensions()
329 const int firstDim = getSizeOfDimension(shape, 0); in transposeFirstTwoDimensions()
330 const int secondDim = getSizeOfDimension(shape, 1); in transposeFirstTwoDimensions()
333 blockSize *= getSizeOfDimension(shape, i); in transposeFirstTwoDimensions()
348 NN_RET_CHECK(getNumberOfDimensions(shape) >= 2); in transposeFirstTwoDimensions()
349 *transposedShape = shape; in transposeFirstTwoDimensions()
350 transposedShape->dimensions[0] = shape.dimensions[1]; in transposeFirstTwoDimensions()
[all …]
/aosp12/packages/modules/NeuralNetworks/common/operations/
H A DBidirectionalSequenceLSTM.cpp336 NN_CHECK_EQ(aux_input_->shape().dimensions[0], input_->shape().dimensions[0]); in Prepare()
337 NN_CHECK_EQ(aux_input_->shape().dimensions[1], input_->shape().dimensions[1]); in Prepare()
382 const Shape& inputShape = input_->shape(); in Prepare()
420 *fwOutputCellState = fw_cell_state_->shape(); in Prepare()
422 *bwOutputCellState = bw_cell_state_->shape(); in Prepare()
459 Shape bwInputShape = input_->shape(); in Eval()
463 bwInputShape = aux_input_->shape(); in Eval()
490 fw_input_to_output_weights_->shape(), in Eval()
542 bw_input_to_output_weights_->shape(), in Eval()
582 Shape bwInputShape = input_->shape(); in Eval()
[all …]
H A DRNN.cpp68 const Shape& inputShape = input->shape(); in Prepare()
84 RNNStep<_Float16>(reinterpret_cast<_Float16*>(input_->buffer), input_->shape(), in Eval()
87 reinterpret_cast<_Float16*>(weights_->buffer), weights_->shape(), in Eval()
89 recurrent_weights_->shape(), activation_, in Eval()
92 sizeof(_Float16) * getNumberOfElements(output_->shape())); in Eval()
96 RNNStep<float>(reinterpret_cast<float*>(input_->buffer), input_->shape(), in Eval()
99 reinterpret_cast<float*>(weights_->buffer), weights_->shape(), in Eval()
101 recurrent_weights_->shape(), activation_, in Eval()
104 sizeof(float) * getNumberOfElements(output_->shape())); in Eval()
H A DSVDF.cpp95 const Shape& inputShape = input->shape(); in Prepare()
114 std::vector<float> inputDataFloat32(getNumberOfElements(input_->shape())); in Eval()
116 std::vector<float> inputStateDataFloat32(getNumberOfElements(state_in_->shape())); in Eval()
119 std::vector<float> biasDataFloat32(getNumberOfElements(bias_->shape())); in Eval()
125 getNumberOfElements(weights_feature_->shape())); in Eval()
128 std::vector<float> weightsTimeDataFloat32(getNumberOfElements(weights_time_->shape())); in Eval()
131 std::vector<float> outputDataFloat32(getNumberOfElements(output_->shape())); in Eval()
132 std::vector<float> outputStateDataFloat32(getNumberOfElements(state_out_->shape())); in Eval()
H A DLogSoftmax.cpp42 inline bool compute(const T* input, const Shape& shape, T beta, uint32_t axis, T* output) { in compute() argument
43 const uint32_t outerSize = getNumberOfElements(shape, 0, axis); in compute()
44 const uint32_t axisSize = getSizeOfDimension(shape, axis); in compute()
45 const uint32_t innerSize = getNumberOfElements(shape, axis + 1, getNumberOfDimensions(shape)); in compute()
H A DQuantizedLSTMTest.cpp34 std::vector<uint32_t> shape; member
38 OperandTypeParams(Type type, std::vector<uint32_t> shape, float scale, int32_t zeroPoint) in OperandTypeParams()
39 : type(type), shape(shape), scale(scale), zeroPoint(zeroPoint) {} in OperandTypeParams()
56 OperandType curType(curOTP.type, curOTP.shape, curOTP.scale, curOTP.zeroPoint); in QuantizedLSTMOpModel()
60 const uint32_t numBatches = inputOperandTypeParams[0].shape[0]; in QuantizedLSTMOpModel()
61 inputSize_ = inputOperandTypeParams[0].shape[0]; in QuantizedLSTMOpModel()
63 inputOperandTypeParams[QuantizedLSTMCell::kPrevCellStateTensor].shape[1]; in QuantizedLSTMOpModel()
188 for (int d : params.shape) { in initializeInputData()
/aosp12/frameworks/av/services/camera/libcameraservice/tests/
H A DDistortionMapperComp.py36 f.write('std::array<int32_t, %d> rawCoords = {\n' % (rawCoords.shape[0] * rawCoords.shape[1]))
37 for i in range(rawCoords.shape[0]):
41 f.write('std::array<int32_t, %d> expCoords = {\n' % (expCoords.shape[0] * expCoords.shape[2]))
42 for i in range(expCoords.shape[0]):
/aosp12/hardware/interfaces/neuralnetworks/1.2/
H A Dtypes.hal812 * Keys should have a shape of [40]. If Lookups tensor has shape
829 * shape [ k ].
1533 * shape of the output tensor. The number of elements implied by shape
1542 * * 0: The output tensor, of shape specified by the input shape.
1961 * shape is [1].
2135 * shape is [1].
2833 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
3028 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
3886 * shape is [1].
3913 * shape is [1].
[all …]
/aosp12/frameworks/base/graphics/java/android/graphics/drawable/shapes/
H A DRoundRectShape.java135 final RoundRectShape shape = (RoundRectShape) super.clone(); in clone() local
136 shape.mOuterRadii = mOuterRadii != null ? mOuterRadii.clone() : null; in clone()
137 shape.mInnerRadii = mInnerRadii != null ? mInnerRadii.clone() : null; in clone()
138 shape.mInset = new RectF(mInset); in clone()
139 shape.mInnerRect = new RectF(mInnerRect); in clone()
140 shape.mPath = new Path(mPath); in clone()
141 return shape; in clone()
H A DShape.java129 Shape shape = (Shape) o; in equals() local
130 return Float.compare(shape.mWidth, mWidth) == 0 in equals()
131 && Float.compare(shape.mHeight, mHeight) == 0; in equals()
H A DRectShape.java64 final RectShape shape = (RectShape) super.clone(); in clone() local
65 shape.mRect = new RectF(mRect); in clone()
66 return shape; in clone()
H A DPathShape.java75 final PathShape shape = (PathShape) super.clone(); in clone() local
76 shape.mPath = new Path(mPath); in clone()
77 return shape; in clone()
/aosp12/hardware/interfaces/neuralnetworks/1.0/
H A Dtypes.hal188 * * 0: The output 4-D tensor, of shape
259 * * 1: A 4-D tensor, of shape
287 * * 1: A 4-D tensor, of shape
309 * * 0: The output 4-D tensor, of shape
490 * have shape of [3, 200, 300].
593 * Keys should have a shape of [40]. If Lookups tensor has shape
610 * shape [ k ].
1196 * shape of the output tensor. The number of elements implied by shape
1202 * of shape can be -1.
1205 * * 0: The output tensor, of shape specified by the input shape.
[all …]
/aosp12/hardware/interfaces/neuralnetworks/1.3/
H A Dtypes.hal801 * Keys should have a shape of [40]. If Lookups tensor has shape
818 * shape [ k ].
1546 * shape of the output tensor. The number of elements implied by shape
1555 * * 0: The output tensor, of shape specified by the input shape.
2020 * shape is [1].
2202 * shape is [1].
3009 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
3210 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
4113 * shape is [1].
4140 * shape is [1].
[all …]
/aosp12/packages/apps/Test/connectivity/sl4n/rapidjson/doc/diagram/
H A Dmove2.dot19 node [shape=Mrecord, style=filled, colorscheme=spectral7]
24 c13 [shape="none", label="...", style="solid"]
42 node [shape=Mrecord, style=filled, colorscheme=spectral7]
48 c23 [shape=none, label="...", style="solid"]
53 c33 [shape="none", label="...", style="solid"]
H A Dmove3.dot20 node [shape=Mrecord, style=filled, colorscheme=spectral7]
25 c13 [shape=none, label="...", style="solid"]
43 node [shape=Mrecord, style=filled, colorscheme=spectral7]
49 c23 [shape="none", label="...", style="solid"]
H A Dsimpledom.dot13 node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
19 node [shape="box", style="filled", fillcolor="gray95"]
30 node [shape=Mrecord, style=filled, colorscheme=spectral7]
/aosp12/packages/modules/NeuralNetworks/tools/api/
H A Dtypes.spec1164 * Keys should have a shape of [40]. If Lookups tensor has shape
1181 * shape [ k ].
2047 * shape of the output tensor. The number of elements implied by shape
2056 * * 0: The output tensor, of shape specified by the input shape.
2628 * shape is [1].
3884 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
4106 * * 2: A 2-D Tensor of shape [num_anchors, 4], specifying the shape of each
5119 * shape is [1].
5147 * shape is [1].
5180 * shape is [1].
[all …]
/aosp12/packages/apps/ThemePicker/src/com/android/customization/model/theme/custom/
H A DColorOptionsProvider.java92 Drawable shape = loadShape(shapePackage); in loadOptions() local
93 addDefault(previewIcons, shape); in loadOptions()
107 option.setShapeDrawable(shape); in loadOptions()
116 private void addDefault(List<Drawable> previewIcons, Drawable shape) { in addDefault() argument
139 option.setShapeDrawable(shape); in addDefault()
162 PathShape shape = new PathShape(PathParser.createPathFromPathData(path), in loadShape() local
164 shapeDrawable = new ShapeDrawable(shape); in loadShape()
H A DShapeOptionsProvider.java99 PathShape shape = new PathShape(path, PATH_SIZE, PATH_SIZE); in createShapeDrawable() local
100 ShapeDrawable shapeDrawable = new ShapeDrawable(shape); in createShapeDrawable()
135 String shape = overlayRes.getString(overlayRes.getIdentifier(CONFIG_ICON_MASK, "string", in loadPath() local
138 if (!TextUtils.isEmpty(shape)) { in loadPath()
139 return PathParser.createPathFromPathData(shape); in loadPath()
/aosp12/packages/modules/NeuralNetworks/runtime/test/specs/V1_2/
H A Dsub_v1_2.mod.py37 shape = "{2, 4, 16, 2}, 0.5, 0" variable
38 input0 = Input("input0", "TENSOR_QUANT8_ASYMM", shape)
39 input1 = Input("input1", "TENSOR_QUANT8_ASYMM", shape)
41 output0 = Output("output0", "TENSOR_QUANT8_ASYMM", shape)
/aosp12/packages/modules/NeuralNetworks/runtime/test/specs/V1_3/
H A Dsub_quant8_signed.mod.py86 shape = "{2, 4, 16, 2}, 0.5, -128" variable
87 input0 = Input("input0", "TENSOR_QUANT8_ASYMM_SIGNED", shape)
88 input1 = Input("input1", "TENSOR_QUANT8_ASYMM_SIGNED", shape)
90 output0 = Output("output0", "TENSOR_QUANT8_ASYMM_SIGNED", shape)

12345