Skip to content
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: gtests: Loose abs error check on AArch64 #2098

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/gtests/graph/unit/backend/dnnl/test_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,9 @@ TEST(test_conv_execute, ConvBiasAddEltwise) {
// We noticed mish test has slight accuracy issue on GPU or AArch64
// CPU or SNB.
dst = eltwise_dst_ts.as_vec_type<float>();
#ifdef DNNL_AARCH64
ASSERT_NEAR(dst[i], param.ref_dst[i], 1e-6);
Copy link
Contributor

@mgouicem mgouicem Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you share which test case is failing?
From the output you shared, it seems to be leakyRelu.
If that is the case, could you just change at line 2450:

  • alpha to .25f for this test case so that it can be represented exactly in float
  • and change reference values with {-4.0f, 2.5f, 3.0f, 0.5f} * .25f = {-1, 0.625, 0.75, 0.125}

Let me know if that fixes the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mourad, I am not really sure if I should enrol for Hogwarts, or I have discovered a bug, because while trying out your suggestion I have figured out that the test passes without the contribution, on the same machine and instance.... I know this sounds like sorcery but I have now spent some significant amount of time trying to reproduce this. I have tried with different compiles, commits and build configurations but it passed. As a result, we decided that we will closely monitor the behaviour of this specific test and will report any updates that we have. Has this behaviour been encountered before? Do you have any idea what could cause such issues? In case any issues may appear related to this please @ me.

Thanks!

#else
if (eng->kind() == graph::engine_kind::gpu
|| (eng->kind() == graph::engine_kind::cpu
&& dnnl_get_effective_cpu_isa()
Expand All @@ -2556,6 +2559,7 @@ TEST(test_conv_execute, ConvBiasAddEltwise) {
} else {
ASSERT_FLOAT_EQ(dst[i], param.ref_dst[i]);
}
#endif
}
}
}
Expand Down