Update size each time to ensure correct data copy in If node#34971
Update size each time to ensure correct data copy in If node#34971mangguo321 wants to merge 2 commits intoopenvinotoolkit:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an element-count bookkeeping issue in the Intel CPU plugin If node port mapping, ensuring cpu_convert copies/converts the correct number of elements even when the shape stays static at runtime.
Changes:
- Update
If::PortMapHelper::redefineTo()to refreshsizeon every call (not only when output memory descriptors are redefined).
| } | ||
| size = srcMemPtr->getShape().getElementsCount(); | ||
| } |
There was a problem hiding this comment.
[HIGH] This is a behavioral bug fix in the If port mapping/data-copy path, but the PR doesn't add a regression test to ensure the element-count passed to cpu_convert is non-zero/accurate when the source memory descriptor is undefined at PortMapHelper construction and the runtime shape is static (the scenario described in the PR). Please add a targeted CPU functional/unit test that reproduces the prior failure (e.g., static runtime shape + required copy/convert between If external/internal memories) to prevent regressions.
e74218b to
cce37a6
Compare
Details:
Tickets: