src/plugins/intel_gpu/docs/dynamic_shape/overall_flow.md
<a name="Fig1"></a>
flowchart TD
A["primitive_inst::execute()"] --> B{"is dynamic?"}
B --> |No | H["Execute impl"]
B --> |Yes | C["runtime in_place_concat"]
C --> D["update_shape()"]
D --> E{"shape changed from
previous inference?"}
E --> |No | H["Execute impl"]
E --> |Yes| G{"Valid fusion?"}
G --> |No | I{"Create unfused subgraph"}
I --> II["Execute subgraph"]
G --> |Yes | J["update_impl()"]
J --> JJ{"Impl changed?"}
JJ --> |No | L["Set arguments"]
L --> H
JJ --> |Yes | KK{"preferred weight format
changed?"}
KK --> |Yes | M["update_weights()"]
KK --> |No | O{"Is current memory enough
for the new shape?"}
M --> O
O --> |No |P["reallocate output memory"]
O --> |Yes | L
P --> L
<a href="#Fig1">Figure 1</a> presents the basic flow of a primitive execution when its program_node has a dynamic shape. A brief explanation for each steps are as follows, and the more detailed explanation of which is to be found in the implementation details section.