/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ops/ |
H A D | lstm_builder.cpp | 31 OH_NN_ReturnCode LSTMBuilder::SetBidirectional(const std::shared_ptr<NNTensor>& tensor)
in SetBidirectional() argument 33 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetBidirectional() 38 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetBidirectional() 43 void* buffer = tensor->GetBuffer();
in SetBidirectional() 53 OH_NN_ReturnCode LSTMBuilder::SetHasBias(const std::shared_ptr<NNTensor>& tensor)
in SetHasBias() argument 55 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetHasBias() 60 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetHasBias() 65 void* buffer = tensor->GetBuffer();
in SetHasBias() 75 OH_NN_ReturnCode LSTMBuilder::SetInputSize(const std::shared_ptr<NNTensor>& tensor)
in SetInputSize() argument 77 if (tensor in SetInputSize() 97 SetHiddenSize(const std::shared_ptr<NNTensor>& tensor) SetHiddenSize() argument 119 SetNumLayers(const std::shared_ptr<NNTensor>& tensor) SetNumLayers() argument 141 SetNumDirections(const std::shared_ptr<NNTensor>& tensor) SetNumDirections() argument 163 SetDropout(const std::shared_ptr<NNTensor>& tensor) SetDropout() argument 185 SetZoneoutCell(const std::shared_ptr<NNTensor>& tensor) SetZoneoutCell() argument 207 SetZoneoutHidden(const std::shared_ptr<NNTensor>& tensor) SetZoneoutHidden() argument 229 SetProjSize(const std::shared_ptr<NNTensor>& tensor) SetProjSize() argument 256 std::shared_ptr<NNTensor> tensor = allTensors[i]; ParseParam() local [all...] |
H A D | detection_post_process_builder.cpp | 36 OH_NN_ReturnCode DetectionPostProcessBuilder::SetInputSize(const std::shared_ptr<NNTensor>& tensor)
in SetInputSize() argument 38 if (tensor->GetDataType() != OH_NN_INT64) {
in SetInputSize() 43 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetInputSize() 48 void* buffer = tensor->GetBuffer();
in SetInputSize() 58 OH_NN_ReturnCode DetectionPostProcessBuilder::SetScale(const std::shared_ptr<NNTensor>& tensor)
in SetScale() argument 60 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetScale() 67 void* buffer = tensor->GetBuffer();
in SetScale() 75 uint32_t elementCount = tensor->GetElementCount();
in SetScale() 84 OH_NN_ReturnCode DetectionPostProcessBuilder::SetNmsIoUThreshold(const std::shared_ptr<NNTensor>& tensor)
in SetNmsIoUThreshold() argument 86 if (tensor in SetNmsIoUThreshold() 106 SetNmsScoreThreshold(const std::shared_ptr<NNTensor>& tensor) SetNmsScoreThreshold() argument 128 SetMaxDetections(const std::shared_ptr<NNTensor>& tensor) SetMaxDetections() argument 150 SetDetectionsPerClass(const std::shared_ptr<NNTensor>& tensor) SetDetectionsPerClass() argument 172 SetMaxClassesPerDetection(const std::shared_ptr<NNTensor>& tensor) SetMaxClassesPerDetection() argument 194 SetNumClasses(const std::shared_ptr<NNTensor>& tensor) SetNumClasses() argument 216 SetUseRegularNms(const std::shared_ptr<NNTensor>& tensor) SetUseRegularNms() argument 238 SetOutQuantized(const std::shared_ptr<NNTensor>& tensor) SetOutQuantized() argument 288 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | resize_bilinear_builder.cpp | 33 OH_NN_ReturnCode ResizeBilinearBuilder::SetNewHeight(const std::shared_ptr<NNTensor>& tensor) in SetNewHeight() argument 35 tensor->IdentifyOpParameter(); in SetNewHeight() 36 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetNewHeight() 41 if (tensor->GetDataType() != OH_NN_INT64) { in SetNewHeight() 46 void* buffer = tensor->GetBuffer(); in SetNewHeight() 56 OH_NN_ReturnCode ResizeBilinearBuilder::SetNewWidth(const std::shared_ptr<NNTensor>& tensor) in SetNewWidth() argument 58 tensor->IdentifyOpParameter(); in SetNewWidth() 59 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetNewWidth() 64 if (tensor->GetDataType() != OH_NN_INT64) { in SetNewWidth() 69 void* buffer = tensor in SetNewWidth() 79 SetPreserveAspectRatio(const std::shared_ptr<NNTensor>& tensor) SetPreserveAspectRatio() argument 102 SetCoordinateTransformMode(const std::shared_ptr<NNTensor>& tensor) SetCoordinateTransformMode() argument 128 SetExcludeOutside(const std::shared_ptr<NNTensor>& tensor) SetExcludeOutside() argument 177 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | pooling_builder.cpp | 59 std::shared_ptr<NNTensor> tensor = allTensors[i]; in PoolingBuild() local 60 if (m_paramMap.find(tensor->GetType()) != m_paramMap.end()) { in PoolingBuild() 61 returnCode = (this->*(m_paramMap[tensor->GetType()]))(tensor); in PoolingBuild() 63 LOGE("[PoolingBuilder] Build failed, param invalid, type=%d", tensor->GetType()); in PoolingBuild() 95 OH_NN_ReturnCode PoolingBuilder::SetKernel(const std::shared_ptr<NNTensor>& tensor) in SetKernel() argument 97 tensor->IdentifyOpParameter(); in SetKernel() 99 if (tensor->GetDataType() != OH_NN_INT64) { in SetKernel() 104 void* buffer = tensor->GetBuffer(); in SetKernel() 111 uint32_t kernelSize = tensor in SetKernel() 117 SetStrides(const std::shared_ptr<NNTensor>& tensor) SetStrides() argument 139 SetPadModeOrPaddings(const std::shared_ptr<NNTensor>& tensor) SetPadModeOrPaddings() argument 183 SetRoundMode(const std::shared_ptr<NNTensor>& tensor) SetRoundMode() argument 216 SetActivation(const std::shared_ptr<NNTensor>& tensor) SetActivation() argument 247 SetGlobal(const std::shared_ptr<NNTensor>& tensor) SetGlobal() argument [all...] |
H A D | conv2d_builder.cpp | 86 OH_NN_ReturnCode Conv2DBuilder::SetStrides(const std::shared_ptr<NNTensor>& tensor) in SetStrides() argument 88 tensor->IdentifyOpParameter(); in SetStrides() 90 if (tensor->GetDataType() != OH_NN_INT64) { in SetStrides() 95 void* buffer = tensor->GetBuffer(); in SetStrides() 101 uint32_t stridesSize = tensor->GetElementCount(); in SetStrides() 107 OH_NN_ReturnCode Conv2DBuilder::SetDilation(const std::shared_ptr<NNTensor>& tensor) in SetDilation() argument 109 tensor->IdentifyOpParameter(); in SetDilation() 111 if (tensor->GetDataType() != OH_NN_INT64) { in SetDilation() 116 void* buffer = tensor->GetBuffer(); in SetDilation() 122 uint32_t dilationSize = tensor in SetDilation() 128 SetPad(const std::shared_ptr<NNTensor>& tensor) SetPad() argument 173 SetGroup(const std::shared_ptr<NNTensor>& tensor) SetGroup() argument 197 SetActavitation(const std::shared_ptr<NNTensor>& tensor) SetActavitation() argument 254 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | lrn_builder.cpp | 35 OH_NN_ReturnCode LRNBuilder::SetDepthRadius(const std::shared_ptr<NNTensor>& tensor)
in SetDepthRadius() argument 37 if (tensor->GetDataType() != OH_NN_INT64) {
in SetDepthRadius() 42 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetDepthRadius() 47 void* buffer = tensor->GetBuffer();
in SetDepthRadius() 57 OH_NN_ReturnCode LRNBuilder::SetBias(const std::shared_ptr<NNTensor>& tensor)
in SetBias() argument 59 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetBias() 64 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetBias() 69 void* buffer = tensor->GetBuffer();
in SetBias() 79 OH_NN_ReturnCode LRNBuilder::SetAlpha(const std::shared_ptr<NNTensor>& tensor)
in SetAlpha() argument 81 if (tensor in SetAlpha() 101 SetBeta(const std::shared_ptr<NNTensor>& tensor) SetBeta() argument 123 SetNormRegion(const std::shared_ptr<NNTensor>& tensor) SetNormRegion() argument 179 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | argmax_builder.cpp | 30 OH_NN_ReturnCode ArgMaxBuilder::SetAxis(const std::shared_ptr<NNTensor>& tensor) in SetAxis() argument 32 tensor->IdentifyOpParameter(); in SetAxis() 34 if (tensor->GetDataType() != OH_NN_INT64) { in SetAxis() 39 void* buffer = tensor->GetBuffer(); in SetAxis() 49 OH_NN_ReturnCode ArgMaxBuilder::SetTopK(const std::shared_ptr<NNTensor>& tensor) in SetTopK() argument 51 tensor->IdentifyOpParameter(); in SetTopK() 53 if (tensor->GetDataType() != OH_NN_INT64) { in SetTopK() 58 void* buffer = tensor->GetBuffer(); in SetTopK() 68 OH_NN_ReturnCode ArgMaxBuilder::SetKeepdims(const std::shared_ptr<NNTensor>& tensor) in SetKeepdims() argument 70 tensor in SetKeepdims() 87 SetOutMaxValue(const std::shared_ptr<NNTensor>& tensor) SetOutMaxValue() argument 136 const std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | fullconnection_builder.cpp | 57 OH_NN_ReturnCode FullConnectionBuilder::SetHasBias(const std::shared_ptr<NNTensor>& tensor) in SetHasBias() argument 59 if (tensor->GetDataType() != OH_NN_BOOL) { in SetHasBias() 64 if (tensor->GetElementCount() != SCALAR_LENGTH) { in SetHasBias() 69 void* buffer = tensor->GetBuffer(); in SetHasBias() 79 OH_NN_ReturnCode FullConnectionBuilder::SetUseAxis(const std::shared_ptr<NNTensor>& tensor) in SetUseAxis() argument 81 if (tensor->GetDataType() != OH_NN_BOOL) { in SetUseAxis() 86 if (tensor->GetElementCount() != SCALAR_LENGTH) { in SetUseAxis() 91 void* buffer = tensor->GetBuffer(); in SetUseAxis() 108 OH_NN_ReturnCode FullConnectionBuilder::SetFullConnectionActivation(const std::shared_ptr<NNTensor>& tensor) in SetFullConnectionActivation() argument 110 tensor in SetFullConnectionActivation() 138 SetAxis(const std::shared_ptr<NNTensor>& tensor) SetAxis() argument 193 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor Build() local [all...] |
H A D | matmul_builder.cpp | 35 OH_NN_ReturnCode MatmulBuilder::SetTransposeA(const std::shared_ptr<NNTensor>& tensor) in SetTransposeA() argument 37 tensor->IdentifyOpParameter(); in SetTransposeA() 38 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetTransposeA() 43 if (tensor->GetDataType() != OH_NN_BOOL) { in SetTransposeA() 48 void* buffer = tensor->GetBuffer(); in SetTransposeA() 58 OH_NN_ReturnCode MatmulBuilder::SetTransposeB(const std::shared_ptr<NNTensor>& tensor) in SetTransposeB() argument 60 tensor->IdentifyOpParameter(); in SetTransposeB() 61 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetTransposeB() 66 if (tensor->GetDataType() != OH_NN_BOOL) { in SetTransposeB() 71 void* buffer = tensor in SetTransposeB() 81 SetActivationType(const std::shared_ptr<NNTensor>& tensor) SetActivationType() argument 137 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | depthwise_conv2d_native_builder.cpp | 44 OH_NN_ReturnCode DepthwiseConv2DNativeBuilder::SetIsPadMode(const std::shared_ptr<NNTensor>& tensor, in SetIsPadMode() argument 47 if (tensor->GetElementCount() == PAD_MODE_SIZE) { in SetIsPadMode() 49 } else if (tensor->GetElementCount() != PAD_LIST_SIZE) { in SetIsPadMode() 58 OH_NN_ReturnCode DepthwiseConv2DNativeBuilder::SetActivation(const std::shared_ptr<NNTensor>& tensor) in SetActivation() argument 60 tensor->IdentifyOpParameter(); in SetActivation() 62 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetActivation() 67 if (tensor->GetDataType() != OH_NN_INT8) { in SetActivation() 72 void* buffer = tensor->GetBuffer(); in SetActivation() 104 OH_NN_ReturnCode DepthwiseConv2DNativeBuilder::SetStrides(const std::shared_ptr<NNTensor>& tensor) in SetStrides() argument 106 tensor in SetStrides() 123 SetDilation(const std::shared_ptr<NNTensor>& tensor) SetDilation() argument 143 SetPadModeOrPaddings(const std::shared_ptr<NNTensor>& tensor) SetPadModeOrPaddings() argument 234 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor Build() local [all...] |
H A D | reduceprod_builder.cpp | 34 OH_NN_ReturnCode ReduceProdBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor) in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) { in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetCoeff() 46 void* buffer = tensor->GetBuffer(); in SetCoeff() 56 OH_NN_ReturnCode ReduceProdBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor) in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) { in SetReduceToEnd() 63 tensor->IdentifyOpParameter(); in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer(); in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceProdBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor) in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reducesum_builder.cpp | 34 OH_NN_ReturnCode ReduceSumBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor)
in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetCoeff() 46 void* buffer = tensor->GetBuffer();
in SetCoeff() 56 OH_NN_ReturnCode ReduceSumBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor)
in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetReduceToEnd() 63 tensor->IdentifyOpParameter();
in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer();
in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceSumBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor)
in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reducemin_builder.cpp | 34 OH_NN_ReturnCode ReduceMinBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor)
in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetCoeff() 46 void* buffer = tensor->GetBuffer();
in SetCoeff() 56 OH_NN_ReturnCode ReduceMinBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor)
in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetReduceToEnd() 63 tensor->IdentifyOpParameter();
in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer();
in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceMinBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor)
in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reducemean_builder.cpp | 34 OH_NN_ReturnCode ReduceMeanBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor) in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) { in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetCoeff() 46 void* buffer = tensor->GetBuffer(); in SetCoeff() 56 OH_NN_ReturnCode ReduceMeanBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor) in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) { in SetReduceToEnd() 63 tensor->IdentifyOpParameter(); in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer(); in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceMeanBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor) in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reducemax_builder.cpp | 34 OH_NN_ReturnCode ReduceMaxBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor)
in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetCoeff() 46 void* buffer = tensor->GetBuffer();
in SetCoeff() 56 OH_NN_ReturnCode ReduceMaxBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor)
in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetReduceToEnd() 63 tensor->IdentifyOpParameter();
in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer();
in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceMaxBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor)
in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reduceall_builder.cpp | 34 OH_NN_ReturnCode ReduceAllBuilder::SetCoeff(const std::shared_ptr<NNTensor>& tensor) in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) { in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetCoeff() 46 void* buffer = tensor->GetBuffer(); in SetCoeff() 56 OH_NN_ReturnCode ReduceAllBuilder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor) in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) { in SetReduceToEnd() 63 tensor->IdentifyOpParameter(); in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) { in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer(); in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceAllBuilder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor) in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | reduceL2_builder.cpp | 34 OH_NN_ReturnCode ReduceL2Builder::SetCoeff(const std::shared_ptr<NNTensor>& tensor)
in SetCoeff() argument 36 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetCoeff() 41 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetCoeff() 46 void* buffer = tensor->GetBuffer();
in SetCoeff() 56 OH_NN_ReturnCode ReduceL2Builder::SetReduceToEnd(const std::shared_ptr<NNTensor>& tensor)
in SetReduceToEnd() argument 58 if (tensor->GetDataType() != OH_NN_BOOL) {
in SetReduceToEnd() 63 tensor->IdentifyOpParameter();
in SetReduceToEnd() 64 if (tensor->GetElementCount() != SCALE_LENGTH) {
in SetReduceToEnd() 69 void* buffer = tensor->GetBuffer();
in SetReduceToEnd() 79 OH_NN_ReturnCode ReduceL2Builder::SetKeepDims(const std::shared_ptr<NNTensor>& tensor)
in SetKeepDims() argument 128 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | conv2d_transpose_builder.cpp | 79 OH_NN_ReturnCode Conv2DTransposeBuilder::SetStrides(const std::shared_ptr<NNTensor>& tensor) in SetStrides() argument 81 tensor->IdentifyOpParameter(); in SetStrides() 83 if (tensor->GetDataType() != OH_NN_INT64) { in SetStrides() 88 void* buffer = tensor->GetBuffer(); in SetStrides() 94 uint32_t elementSize = tensor->GetElementCount(); in SetStrides() 100 OH_NN_ReturnCode Conv2DTransposeBuilder::SetDilation(const std::shared_ptr<NNTensor>& tensor) in SetDilation() argument 102 tensor->IdentifyOpParameter(); in SetDilation() 104 if (tensor->GetDataType() != OH_NN_INT64) { in SetDilation() 109 void* buffer = tensor->GetBuffer(); in SetDilation() 115 uint32_t dilationSize = tensor in SetDilation() 121 SetPad(const std::shared_ptr<NNTensor>& tensor) SetPad() argument 166 SetGroup(const std::shared_ptr<NNTensor>& tensor) SetGroup() argument 190 SetOutPadding(const std::shared_ptr<NNTensor>& tensor) SetOutPadding() argument 211 SetActivation(const std::shared_ptr<NNTensor>& tensor) SetActivation() argument 264 std::shared_ptr<NNTensor> tensor = allTensors[i]; // 参数 tensor Build() local [all...] |
H A D | l2_normalize_builder.cpp | 35 OH_NN_ReturnCode L2NormalizeBuilder::SetAxis(const std::shared_ptr<NNTensor>& tensor)
in SetAxis() argument 37 if (tensor->GetDataType() != OH_NN_INT64) {
in SetAxis() 44 void* buffer = tensor->GetBuffer();
in SetAxis() 52 uint32_t elementCount = tensor->GetElementCount();
in SetAxis() 61 OH_NN_ReturnCode L2NormalizeBuilder::SetEpsilon(const std::shared_ptr<NNTensor>& tensor)
in SetEpsilon() argument 63 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetEpsilon() 68 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetEpsilon() 73 void* buffer = tensor->GetBuffer();
in SetEpsilon() 83 OH_NN_ReturnCode L2NormalizeBuilder::SetActivationType(const std::shared_ptr<NNTensor>& tensor)
in SetActivationType() argument 85 if (tensor in SetActivationType() 137 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | exp_builder.cpp | 31 OH_NN_ReturnCode ExpBuilder::SetBase(const std::shared_ptr<NNTensor>& tensor)
in SetBase() argument 33 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetBase() 38 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetBase() 43 void* buffer = tensor->GetBuffer();
in SetBase() 53 OH_NN_ReturnCode ExpBuilder::SetScale(const std::shared_ptr<NNTensor>& tensor)
in SetScale() argument 55 if (tensor->GetDataType() != OH_NN_FLOAT32) {
in SetScale() 60 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetScale() 65 void* buffer = tensor->GetBuffer();
in SetScale() 75 OH_NN_ReturnCode ExpBuilder::SetShift(const std::shared_ptr<NNTensor>& tensor)
in SetShift() argument 77 if (tensor in SetShift() 123 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | range_builder.cpp | 31 OH_NN_ReturnCode RangeBuilder::SetStart(const std::shared_ptr<NNTensor>& tensor)
in SetStart() argument 33 if (tensor->GetDataType() != OH_NN_INT64) {
in SetStart() 38 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetStart() 43 void* buffer = tensor->GetBuffer();
in SetStart() 53 OH_NN_ReturnCode RangeBuilder::SetLimit(const std::shared_ptr<NNTensor>& tensor)
in SetLimit() argument 55 if (tensor->GetDataType() != OH_NN_INT64) {
in SetLimit() 60 if (tensor->GetElementCount() != SCALAR_LENGTH) {
in SetLimit() 65 void* buffer = tensor->GetBuffer();
in SetLimit() 75 OH_NN_ReturnCode RangeBuilder::SetDelta(const std::shared_ptr<NNTensor>& tensor)
in SetDelta() argument 77 if (tensor in SetDelta() 123 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | strided_slice_builder.cpp | 50 OH_NN_ReturnCode StridedSliceBuilder::SetBeginMask(const std::shared_ptr<NNTensor>& tensor) in SetBeginMask() argument 52 if (tensor->GetDataType() != OH_NN_INT64) { in SetBeginMask() 57 void* buffer = tensor->GetBuffer(); in SetBeginMask() 67 OH_NN_ReturnCode StridedSliceBuilder::SetEndMask(const std::shared_ptr<NNTensor>& tensor) in SetEndMask() argument 69 if (tensor->GetDataType() != OH_NN_INT64) { in SetEndMask() 74 void* buffer = tensor->GetBuffer(); in SetEndMask() 84 OH_NN_ReturnCode StridedSliceBuilder::SetEllipsisMask(const std::shared_ptr<NNTensor>& tensor) in SetEllipsisMask() argument 86 if (tensor->GetDataType() != OH_NN_INT64) { in SetEllipsisMask() 91 void* buffer = tensor->GetBuffer(); in SetEllipsisMask() 101 OH_NN_ReturnCode StridedSliceBuilder::SetNewAxisMask(const std::shared_ptr<NNTensor>& tensor) in SetNewAxisMask() argument 118 SetShrinkAxisMask(const std::shared_ptr<NNTensor>& tensor) SetShrinkAxisMask() argument 164 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
H A D | quant_dtype_cast_builder.cpp | 33 OH_NN_ReturnCode QuantDTypeCastBuilder::SetSrcT(const std::shared_ptr<NNTensor>& tensor) in SetSrcT() argument 35 tensor->IdentifyOpParameter(); in SetSrcT() 36 if (tensor->GetDataType() != OH_NN_INT64) { in SetSrcT() 41 void* buffer = tensor->GetBuffer(); in SetSrcT() 51 OH_NN_ReturnCode QuantDTypeCastBuilder::SetDstT(const std::shared_ptr<NNTensor>& tensor) in SetDstT() argument 53 tensor->IdentifyOpParameter(); in SetDstT() 54 if (tensor->GetDataType() != OH_NN_INT64) { in SetDstT() 59 void* buffer = tensor->GetBuffer(); in SetDstT() 69 OH_NN_ReturnCode QuantDTypeCastBuilder::SetAxis(const std::shared_ptr<NNTensor>& tensor) in SetAxis() argument 71 tensor in SetAxis() 113 std::shared_ptr<NNTensor> tensor = allTensors[i]; Build() local [all...] |
/foundation/ai/neural_network_runtime/test/unittest/components/v2_0/inner_model/ |
H A D | nn_tensor_test.cpp | 40 OH_NN_Tensor tensor {OH_NN_FLOAT32, 2, dim, nullptr, OH_NN_TENSOR}; in HWTEST_F() 43 EXPECT_EQ(OH_NN_SUCCESS, nnTensor.BuildFromOHNNTensor(tensor)); in HWTEST_F() 53 OH_NN_Tensor tensor; in HWTEST_F() local 54 tensor.dataType = OH_NN_FLOAT32; in HWTEST_F() 55 tensor.dimensionCount = 2; in HWTEST_F() 56 tensor.dimensions = nullptr; in HWTEST_F() 57 tensor.quantParam = nullptr; in HWTEST_F() 58 tensor.type = OH_NN_TENSOR; in HWTEST_F() 61 EXPECT_EQ(OH_NN_INVALID_PARAMETER, nnTensor.BuildFromOHNNTensor(tensor)); in HWTEST_F() 66 * @tc.desc: Verify the invalid shape tensor o 442 OH_NN_Tensor tensor; HWTEST_F() local [all...] |
/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/inner_model/ |
H A D | nn_tensor_test.cpp | 40 OH_NN_Tensor tensor {OH_NN_FLOAT32, 2, dim, nullptr, OH_NN_TENSOR}; in HWTEST_F() 43 EXPECT_EQ(OH_NN_SUCCESS, nnTensor.BuildFromOHNNTensor(tensor)); in HWTEST_F() 53 OH_NN_Tensor tensor; in HWTEST_F() local 54 tensor.dataType = OH_NN_FLOAT32; in HWTEST_F() 55 tensor.dimensionCount = 2; in HWTEST_F() 56 tensor.dimensions = nullptr; in HWTEST_F() 57 tensor.quantParam = nullptr; in HWTEST_F() 58 tensor.type = OH_NN_TENSOR; in HWTEST_F() 61 EXPECT_EQ(OH_NN_INVALID_PARAMETER, nnTensor.BuildFromOHNNTensor(tensor)); in HWTEST_F() 66 * @tc.desc: Verify the invalid shape tensor o 442 OH_NN_Tensor tensor; HWTEST_F() local [all...] |