[CPU]fix_coverity_scan_issues - #37338
Conversation
8fc03ba to
241f458
Compare
|
@nshchego , could you please review? |
b51bfca to
540281f
Compare
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR addresses Coverity scan findings in the Intel CPU plugin by hardening edge cases (division-by-zero and invalid shapes) and improving exception-safety / memory handling in a few low-level components.
Changes:
- Add guards to prevent divide-by-zero in softmax and sparse-rate calculations.
- Add runtime validation for interpolation coordinate transform inputs.
- Adjust scratch buffer / memory construction and add exception handling in destructors.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/intel_cpu/src/nodes/scaled_attn.cpp | Avoid divide-by-zero when normalizing softmax output. |
| src/plugins/intel_cpu/src/nodes/llm_mlp.cpp | Change how scratch buffer pointer is shared between ops. |
| src/plugins/intel_cpu/src/nodes/kernels/x64/registers_pool.hpp | Add try/catch in destructors / move assignment and include iostream-based logging. |
| src/plugins/intel_cpu/src/nodes/kernels/scaled_attn/softmax_kernel.hpp | Avoid divide-by-zero when computing scalar for softmax. |
| src/plugins/intel_cpu/src/nodes/fullyconnected.cpp | Avoid divide-by-zero when computing sparse rate. |
| src/plugins/intel_cpu/src/nodes/executors/interpolate.cpp | Throw on invalid inShape == 0 in coordinate transform. |
| src/plugins/intel_cpu/src/nodes/executors/dnnl/dnnl_gathermatmul_executor.cpp | Construct Memory using MemoryBlock for tmp input. |
| src/plugins/intel_cpu/src/emitters/snippets/x64/utils.cpp | Add try/catch in destructor and iostream-based logging. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
540281f to
445ce46
Compare
445ce46 to
14ae35a
Compare
Details:
Tickets:
AI Assistance: