Skip to content

Commit

Permalink
[CPU][ARM] PagedAttention fixes (openvinotoolkit#28017)
Browse files Browse the repository at this point in the history
### Details:
 - Fix: do not infer non-executable node if it's in constant path
- Fix: redefine the 2nd output memory of `PagedAttention` node if
`m_hasScore` is `false`
- These 2 fixes required to support fp16 PagedAttention:
openvinotoolkit#27841

### Tickets:
 - *ticket-id*
  • Loading branch information
alvoron authored Dec 18, 2024
1 parent 7c34fbd commit 7232d24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ void Graph::CreatePrimitivesAndExecConstants() const {
node->createPrimitive();
}

if (!node->isConstant()) {
if (!node->isConstant() || !node->isExecutable()) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/nodes/paged_attn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void PagedAttention::execute(dnnl::stream strm) {
VectorDims scoreDims{len};
redefineOutputMemory({outDims, scoreDims});
} else {
redefineOutputMemory(0, outDims);
redefineOutputMemory({outDims, {0}});
}

outputs[0] = getDstMemoryAtPort(0);
Expand Down

0 comments on commit 7232d24

Please sign in to comment.