diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2024-03-07 16:55:55 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2024-03-08 11:14:41 +0900 |
commit | 4931372337814ff101e9a0da19202b5790f38ced (patch) | |
tree | e97c854f996420c9a7c38501d4ea905b537baaa2 /runtime/onert | |
parent | 2352d1ee5fa084703f47893fe8047a6bb9c54aca (diff) | |
download | nnfw-4931372337814ff101e9a0da19202b5790f38ced.tar.gz nnfw-4931372337814ff101e9a0da19202b5790f38ced.tar.bz2 nnfw-4931372337814ff101e9a0da19202b5790f38ced.zip |
Fix coverity major defectsaccepted/tizen/unified/x/20240311.100104accepted/tizen/unified/20240308.174145
- list of fixed defects
| 6 | Major | 1738991 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/core/src/dumper/dot/OperandNode.cc:38 | R |
| 7 | Major | 1739127 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/libs/benchmark/src/Result.cpp:164 | R |
| 9 | Major | 1740270 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/core/src/compiler/StaticShapeInferer.cc:806 | R |
| 11 | Major | 1741349 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/backend/cpu/KernelGenerator.cc:632 | R |
| 12 | Major | 1742302 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/libs/benchmark/src/Result.cpp:160 | R |
| 13 | Major | 1742935 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/compute/cker/include/cker/operation/Helper/MatmulBCast.h:66 | R |
| 14 | Major | 1743063 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/backend/cpu/KernelGenerator.cc:310 | R |
| 17 | Major | 1744612 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/backend/gpu_cl/KernelGenerator.cc:113 | R |
| 19 | Major | 1745118 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/onert/backend/gpu_cl/KernelGenerator.cc:517 | R |
| 23 | Major | 1747394 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/compute/cker/include/cker/operation/Helper/MatmulBCast.h:65 | R |
| 25 | Major | 1748390 | Undecided | AUTO_CAUSES_COPY | /home/abuild/rpmbuild/BUILD/nnfw-1.25.0/runtime/libs/benchmark/src/Result.cpp:169 | R |
Diffstat (limited to 'runtime/onert')
4 files changed, 6 insertions, 6 deletions
diff --git a/runtime/onert/backend/cpu/KernelGenerator.cc b/runtime/onert/backend/cpu/KernelGenerator.cc index d462daf5c..dff54c1de 100644 --- a/runtime/onert/backend/cpu/KernelGenerator.cc +++ b/runtime/onert/backend/cpu/KernelGenerator.cc @@ -307,7 +307,7 @@ void KernelGenerator::visit(const ir::operation::Conv2D &node) const auto stride = node.param().stride; const auto activation = node.param().activation; - const auto param_padding = node.param().padding; + const auto ¶m_padding = node.param().padding; const auto dilation = node.param().dilation; auto fn = std::make_unique<ops::ConvolutionLayer>(); @@ -629,7 +629,7 @@ void KernelGenerator::visit(const ir::operation::Einsum &node) for (const auto &ifm_idx : node.getInputs()) input_tensors.emplace_back(_tensor_reg->getPortableTensor(ifm_idx)); - const auto equation = node.param().equation; + const auto &equation = node.param().equation; auto fn = std::make_unique<ops::EinsumLayer>(); diff --git a/runtime/onert/backend/gpu_cl/KernelGenerator.cc b/runtime/onert/backend/gpu_cl/KernelGenerator.cc index 31d3134e6..de8d3b463 100644 --- a/runtime/onert/backend/gpu_cl/KernelGenerator.cc +++ b/runtime/onert/backend/gpu_cl/KernelGenerator.cc @@ -110,7 +110,7 @@ void KernelGenerator::get_operation(FunctionMap &Functions) absl::Status KernelGenerator::readConstTensor(const ir::OperandIndex &index, tflite::gpu::TensorOrScalar *param) { - const auto shape = _ctx.at(index).shape(); + const auto &shape = _ctx.at(index).shape(); if (shape.rank() == 0 && shape.num_elements() == 1) { tflite::gpu::Tensor<tflite::gpu::Scalar, tflite::gpu::DataType::FLOAT32> tensor; @@ -514,7 +514,7 @@ void KernelGenerator::visit(const ir::operation::DepthwiseConv2D &node) { std::unique_ptr<tflite::gpu::GPUOperation> gpu_op_1; tflite::gpu::OperationDef op_def_1; - const auto shape = _ctx.at(ofm_index).shape(); + const auto &shape = _ctx.at(ofm_index).shape(); auto new_ind = _tensor_reg->addNewClTensor(shape); addClNode({ifm_index}, {new_ind}, std::move(gpu_op)); diff --git a/runtime/onert/core/src/compiler/StaticShapeInferer.cc b/runtime/onert/core/src/compiler/StaticShapeInferer.cc index 68cff7e3a..ec5d2146b 100644 --- a/runtime/onert/core/src/compiler/StaticShapeInferer.cc +++ b/runtime/onert/core/src/compiler/StaticShapeInferer.cc @@ -803,7 +803,7 @@ void StaticShapeInferer::visit(const ir::operation::Permute &op) // However, it is not applied here, so input/output have the same layout of frontend. Because // "ExecutorFactory" would convert shape of input/output accoding to the layouts when registering // operand info to "TensorBuilder" after calling "StaticShapeInferer" - const auto new_shape = input.info().shape(); + const auto &new_shape = input.info().shape(); output.info().shape(new_shape); } diff --git a/runtime/onert/core/src/dumper/dot/OperandNode.cc b/runtime/onert/core/src/dumper/dot/OperandNode.cc index 88f5254f3..49319d595 100644 --- a/runtime/onert/core/src/dumper/dot/OperandNode.cc +++ b/runtime/onert/core/src/dumper/dot/OperandNode.cc @@ -35,7 +35,7 @@ Operand::Operand(const ir::OperandIndex &index, Type type) : Node{"operand" + std::to_string(index.value())} { { - auto type_to_shape = [](Type type) { + auto type_to_shape = [](Type type) -> const auto & { switch (type) { case Type::MODEL_INPUT: |