Skip to content

Commit 51f98aa

Browse files
authored
[Cpu][Coverity] Cpu coverity fixes (#33703)
### Tickets: - *174923*
1 parent 9cd848a commit 51f98aa

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

src/plugins/intel_cpu/src/emitters/snippets/x64/utils.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ class jit_aux_gpr_holder {
4242

4343
~jit_aux_gpr_holder();
4444

45+
jit_aux_gpr_holder(const jit_aux_gpr_holder&) = delete;
46+
jit_aux_gpr_holder& operator=(const jit_aux_gpr_holder&) = delete;
47+
48+
jit_aux_gpr_holder(jit_aux_gpr_holder&&) = delete;
49+
jit_aux_gpr_holder& operator=(jit_aux_gpr_holder&&) = delete;
50+
4551
[[nodiscard]] const Xbyak::Reg64& get_reg() const {
4652
return m_aux_gpr_idx;
4753
}

src/plugins/intel_cpu/src/graph_optimizer.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -867,27 +867,26 @@ void GraphOptimizer::FuseConvDeconvFCAndConvertOnWeights(Graph& graph) {
867867
parent = transpose->getParentEdgeAt(0)->getParent();
868868
}
869869

870-
const auto convert = parent;
871-
if (!isSuitableConvert(convert)) {
870+
if (!isSuitableConvert(parent)) {
872871
continue;
873872
}
874873

875-
const auto weights = convert->getParentEdgeAt(0)->getParent();
874+
const auto weights = parent->getParentEdgeAt(0)->getParent();
876875
const auto weights_out_edge = weights->getChildEdges()[0].lock();
877876
const auto fc_weights_path_edge =
878877
transpose ? transpose->getParentEdgeAt(0) : fullyConnected->getParentEdgeAt(1);
879878
const auto inNum = weights_out_edge->getInputNum();
880879
const auto outNum = fc_weights_path_edge->getOutputNum();
881-
const auto originalPrecision = convert->getOriginalInputPrecisionAtPort(0);
880+
const auto originalPrecision = parent->getOriginalInputPrecisionAtPort(0);
882881
fullyConnected->setOriginalInputPrecisionAtPort(1, originalPrecision);
883882
if (transpose) {
884883
transpose->setOriginalInputPrecisionAtPort(0, originalPrecision);
885884
transpose->setOriginalOutputPrecisionAtPort(0, originalPrecision);
886885
}
887886
graph.RemoveEdge(fc_weights_path_edge);
888887
graph.CreateEdge(weights, transpose ? transpose : fullyConnected, inNum, outNum);
889-
if (convert->getChildEdges().empty()) {
890-
graph.DropNode(convert);
888+
if (parent->getChildEdges().empty()) {
889+
graph.DropNode(parent);
891890
}
892891
}
893892
}

src/plugins/intel_cpu/src/nodes/executors/dnnl/dnnl_matmul_primitive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ static primitive_desc createPrimitiveDesc(const dnnl::memory::desc& inputDesc,
372372
const size_t highestPriority = prim_desc_w_priority.priority;
373373
if (priorityId < highestPriority) {
374374
auto desc_copy = dnnl::primitive_desc(DnnlExtensionUtils::clone_primitive_desc(desc.get(true)));
375-
prim_desc_w_priority = {desc_copy, priorityId};
375+
prim_desc_w_priority = {std::move(desc_copy), priorityId};
376376
}
377377
});
378378

src/plugins/intel_cpu/src/nodes/interpolate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2509,7 +2509,7 @@ void Interpolate::prepareParams() {
25092509
}
25102510

25112511
if (canUseAclExecutor) {
2512-
interpAttrs.dataScales = scales5D;
2512+
interpAttrs.dataScales = std::move(scales5D);
25132513

25142514
std::vector<MemoryDescPtr> srcMemoryDescs;
25152515
for (size_t i = 0; i < getParentEdges().size(); i++) {

src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mlp_fusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ov::intel_cpu::MLPFusionPass::MLPFusionPass() {
125125

126126
// Determine gate_up_type based on pattern matching
127127
LLMMLPNode::GATE_UP_TYPE gate_up_type = LLMMLPNode::GATE_UP_TYPE::SEPARATE;
128-
if (pattern_map.count(gate_up_proj_split)) {
128+
if (pattern_map.find(gate_up_proj_split) != pattern_map.end()) {
129129
auto mlp_gated_up_node = pattern_map.at(mlp_gated_up).get_node_shared_ptr();
130130
auto input0 = mlp_gated_up_node->input_value(0);
131131
auto input1 = mlp_gated_up_node->input_value(1);

0 commit comments

Comments
 (0)