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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Radu2k
Copy link
Contributor

@Radu2k Radu2k commented Sep 18, 2024

Loose the absolute error threshold for ConvBiasAddEltwise graph gtest to 1e-6.

Description

Currently running ctest -R test_graph_unit_dnnl_conv_usm_cpu returns:

/build/oneDNN/tests/gtests/graph/unit/backend/dnnl/test_conv.cpp:2557: Failure
Expected equality of these values:
  dst[i]
    Which is: -0.072591752
  param.ref_dst[i]
    Which is: -0.072591871

This PR solves the issue by lowering the absolute error.

Checklist

General

  • Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • Have you formatted the code using clang-format?

Bug fixes

  • Have you included information on how to reproduce the issue (either in a github issue or in this PR)?
  • Have you added relevant regression tests?

Loose the absolute error threshold for ConvBiasAddEltwise graph gtest
to 1e-6.
@Radu2k Radu2k requested a review from a team as a code owner September 18, 2024 13:02
@@ -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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants