-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[GPU] Canonicalize 3d shape for onednn conv/deconv post operations #32391
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] Canonicalize 3d shape for onednn conv/deconv post operations #32391
Conversation
[Fixed] ov_gpu_unit_tests issue can be reproduced on local machine(A770). |
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
Pass LLM daily test on BMG/A770/LNL |
|
||
dnnl::memory::desc in_scale_desc; | ||
if (is_type<gemm>() || is_type<fully_connected>()) { | ||
in_scale_desc = onednn::layout_to_memory_desc(in_scale, onednn::get_default_data_format(in_scale)); |
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.
Don't gemm and fc need need_blocked when blocked?
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.
It seems gemm/fc don't support the need_blocked flag. fc test-cases in unit-test are failed with the need_blocked flag.
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.
Sorry but it is difficult to understand the logic. Let's discuss offline together with @jade-cho .
- @jade-cho is "need_blocked" proper name? Maybe "allow_blocked" is the right name? actually the behavior seems similar to
!flatten
:( - why should we treat
gemm and fc
differently? If test-case fails, we may change the test case. - Maybe should we implement the logic withint the function itself?
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.
discussed offline. We will clean this up after initial PR is merged.
auto mem_flag = cldnn::format::is_blocked(get_output_layout().format) ? | ||
onednn::mem_flags::need_blocked : onednn::mem_flags::None; | ||
out_scale_desc = onednn::layout_to_memory_desc(out_scale, dnnl::memory::format_tag::undef, mem_flag); | ||
} |
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.
By Sungeun)
step1) Introduce lambda function
To be done by Jade)
step2) Introduce new function: fused_op_layout_to_memory_desc(fused_op_layout, layer_output_layout ...)
step2) change name: need_blocked
--> respect_ov_layout
step2) remove conditional handling for gemm
and FC
|
||
dnnl::memory::desc in_scale_desc; | ||
if (is_type<gemm>() || is_type<fully_connected>()) { | ||
in_scale_desc = onednn::layout_to_memory_desc(in_scale, onednn::get_default_data_format(in_scale)); |
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.
discussed offline. We will clean this up after initial PR is merged.
auto mem_flag = cldnn::format::is_blocked(get_output_layout().format) ? | ||
onednn::mem_flags::need_blocked : onednn::mem_flags::None; | ||
out_scale_desc = onednn::layout_to_memory_desc(out_scale, dnnl::memory::format_tag::undef, mem_flag); | ||
} |
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.
random spot) could you add a test where 1d conv is fused with quantize and mismatch happens between layout and rank?
no perf issue from dGPU daily test |
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
Description of the issue(symptom, root-cause, how it was resolved)
The code and line that caused this issue (if it is not changed directly)
Reproduction step and snapshot (if applicable. Do not attach for customer model)
Problematic graph
It doesn't rely on graph patterns.
Checklist
-- No test for this issue.
Tickets: