-
Notifications
You must be signed in to change notification settings - Fork 1k
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
cpu : aarch64 : reorder : zp correction for 4d shapes #2224
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you for creating a fix quickly, could you also add the below test to tests/benchdnn/inputs/reorder/test_reorder_ci
?
# 4d reorders
--sdt=s8,u8
--ddt=f32
--attr-zero-points=src:common:-1
--stag=adbc
1x12x128x33
@@ -791,7 +791,7 @@ struct jit_uni_reorder_kernel_f32_t : public kernel_t, public jit_generator { | |||
// transposition on the fly | |||
const bool fast_return = prb_.src_scale_type != scale_type_t::MANY | |||
&& prb_.dst_scale_type != scale_type_t::MANY | |||
&& prb_.beta == 0.f; | |||
&& prb_.beta == 0.f && !prb_.req_src_zp && !prb_.req_dst_zp; |
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.
Just curious, do we need !prb_.req_dst_zp
here? In my experimentation the dst zero point wasn't causing issues but I may not have found the right shapes which would cause an issue
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.
@Ryo-not-rio , thanks for the review.
So this looks like it was initially ported from x86 jit_uni_reorder. When I compared assemblies of the 2 I figured this was the point at which it was behaving differently. So for now I have used the same condition used in x86. We can do further testing in future to remove the condition for !prb_.req_dst_zp
. But for now I feel its safe to keep it. Anyway this would still fall to jit:uni but just a fast_return feature would be disabled.
6f063ca
to
2eaca20
Compare
Sure, I have added the above test. |
Description
This PR is the fix for the issue : #2213 raised on github.
There was a missing condition that had to be added when zero-points are involved in the reorder.
Checklist
General
make test
andmake test_benchdnn_*
) pass locally for each commit?