Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3168,7 +3168,7 @@ void GraphOptimizer::MatchSdpaKvCache(Graph& graph) {
auto&& childEdges = node->getChildEdgesAtPort(0);
for (auto&& item : childEdges) {
auto childNode = item->getChild();
if (none_of(childNode->getType(), Type::ScaledDotProductAttention, Type::ShapeOf)) {
if (none_of(childNode->getType(), Type::ScaledDotProductAttention, Type::ShapeOf, Type::Gather)) {
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] This change fixes a crash-prone behavioral bug in KV-cache state assignment, but the PR doesn’t add a regression test covering the newly accepted pattern (MemoryInput having an additional Gather consumer alongside SDPA/ShapeOf). Please add a CPU plugin unit/functional test that builds a model where ReadValue/MemoryInput feeds the fused SDPA-with-KV-cache path and also has a sibling Gather consumer, and asserts compilation + inference works (no null-state crash) and the KV states are assigned/usable.

Copilot generated this review using guidance from repository custom instructions.
return false;
}

Expand Down
Loading