-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[GPU] Fix invalid input format of fused ops for resample opt #32654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GPU] Fix invalid input format of fused ops for resample opt #32654
Conversation
+ Reorder caused unexpected format change Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
src/plugins/intel_gpu/src/kernel_selector/kernels/resample/resample_kernel_opt.cpp
Show resolved
Hide resolved
src/plugins/intel_gpu/src/graph/graph_optimizer/remove_redundant_reorders.cpp
Outdated
Show resolved
Hide resolved
+ Not to add Reorder for resample in reorder_inputs + Not to add logic into remove_redundant_reorder Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
hyunback
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ahnyoung-paul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Min,Byungil <[email protected]>
| std::vector<size_t> get_shape_infer_dependencies() const override { return {1, 2}; } | ||
| std::vector<size_t> get_shape_infer_dependencies() const override { | ||
| // if vector of sizes or scales exists, resample in CreateInterpolateOp generates no dependency for inputs of sizes and scales | ||
| if (typed_desc()->sizes.size() != 0 || typed_desc()->scales.size() != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could you add an assertion so that we can prevent mistake in the future?
// Both sizes and scales should be fed as attribute
OPENVINO_ASSERT(typed_desc()->sizes.size() != 0 && typed_desc()->scales.size() != 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied assertion to prevent mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied assertion to the if condition.
+ add assertion to prevent possible mistake Signed-off-by: Min,Byungil <[email protected]>
Signed-off-by: Min,Byungil <[email protected]>
…otoolkit#32654) + Reorder caused unexpected input format for resample_opt kernel's fused ops ### Description of the issue - A Reorder is added between the Resample and its dep node, 'conv.81', at reorder_inputs. Input preferred format of the Resample was simple format while 'conv.81' has blocked format output. <img width="1145" height="39" alt="image" src="https://github.com/user-attachments/assets/5af9325d-0d76-439b-9a24-5650cf088951" /> - The reason of simple format selection is that get_shape_infer_dependencies() of Resample returned dependency of input1,2 However, this resample primitive did not have input1,2 as the shape_infer_dependencies because it is already converted to attribute. Input1 was actually an input from fused operation. - Dependency result from get_shape_infer_dependencies() of Resample was invalid. If vector values of sizes and scales exists, it means Resample has no dependency for input1 and input2. #### The code and line that caused this issue - When Resample primitive is created, input1 and 2 may be converted to attribute from this code src/plugins/intel_gpu/src/plugin/ops/interpolate.cpp - missing logic in resample_opt.cpp to prevent simple format post-ops #### Reproduction step and snapshot - Reproduced by benchmark `./benchmark_app -m inference.xml -d GPU.1 -nireq 1 -niter 1 -data_shape x[1,3,736,608]` #### Checklist - [x] Is it a proper fix? - [X] Did you include test case for this fix, if necessary? - [x] Did you review existing test that can be extended to cover this scenario? Passed llm_bench ### Tickets: - CVS-175824 --------- Signed-off-by: Min,Byungil <[email protected]>
Description of the issue
Input preferred format of the Resample was simple format while 'conv.81' has blocked format output.
However, this resample primitive did not have input1,2 as the shape_infer_dependencies because it is already converted to attribute. Input1 was actually an input from fused operation.
If vector values of sizes and scales exists, it means Resample has no dependency for input1 and input2.
The code and line that caused this issue
src/plugins/intel_gpu/src/plugin/ops/interpolate.cpp
Reproduction step and snapshot
./benchmark_app -m inference.xml -d GPU.1 -nireq 1 -niter 1 -data_shape x[1,3,736,608]Checklist
Tickets: