[PDPD] Fix FastRCNN unsupported-operation crash on expand_2.tmp_0 (dynamic-rank Broadcast)#36890
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a Paddle frontend edge case where expand_v2 conversion can produce an OpenVINO Broadcast whose target-shape tensor has dynamic length, leading to a dynamic-rank Broadcast output and a CPU plugin compilation crash (notably in FastRCNN-like control-flow bodies).
Changes:
- In the Paddle
expand_v2translator, pin theBroadcasttarget-shape vector length to the statically known output rank (usingGatherwith constant indices). - Add a new Paddle model generator case intended to exercise
expand_v2inside control flow. - Register the new model in the Paddle frontend “fuzzy op” CPU-execution test set.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/frontends/paddle/src/op/expand_v2.cpp |
Pins Broadcast target-shape length to static output rank via Gather to avoid dynamic-rank Broadcast outputs. |
src/frontends/paddle/tests/test_models/gen_scripts/generate_expand_v2.py |
Adds a control-flow model generator case for expand_v2 and reformats existing code. |
src/frontends/paddle/tests/op_fuzzy.cpp |
Includes the newly generated control-flow model in the CPU-backed fuzzy execution suite. |
|
Hi @azhai219 could you review the PR? |
ok |
CI Doctor — Merge Queue failure on this PRPipeline: Linux (Ubuntu 22.04, ARM64 cross-compilation, Python 3.11) Possible remedy
What happenedThe ARM64 functional test
|

Details:
expand_v2translator can emit an opsetBroadcastwhose target-shapevector has a dynamic length, producing a dynamic-rank output. When such an
expand_v2sits inside a control-flow body (e.g. PaddleDetectionfaster_rcnn_r50_1x_coco),CPU plugin compilation will crash.
this pr pins the Broadcast target-shape length to the statically-known expand output
rank, keeping the Broadcast output rank static.
Tickets: