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

test fail on intel gpu #941

Closed
meteor-lsw opened this issue Nov 9, 2023 · 4 comments
Closed

test fail on intel gpu #941

meteor-lsw opened this issue Nov 9, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@meteor-lsw
Copy link
Contributor

When I run the script 'run-checks.sh all' using Intel's integrated graphics card, I got the following error.

image

failures:

---- tests::ad_cos::tests::should_diff_cos stdout ----
thread 'tests::ad_cos::tests::should_diff_cos' panicked at burn-wgpu/src/lib.rs:48:5:
Tensors are not approx eq:
=> Position 1: -39.12511444091797 != -39.123374938964844 | difference 0.001739501953125 > tolerance 0.0010000000000000002
=> Position 3: 49.75035095214844 != 49.748355865478516 | difference 0.001995086669921875 > tolerance 0.0010000000000000002
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

---- tests::ad_sin::tests::should_diff_sin stdout ----
thread 'tests::ad_sin::tests::should_diff_sin' panicked at burn-wgpu/src/lib.rs:48:5:
Tensors are not approx eq:
=> Position 1: 44.195899963378906 != 44.19477462768555 | difference 0.001125335693359375 > tolerance 0.0010000000000000002
=> Position 3: -80.46344757080078 != -80.4609375 | difference 0.00251007080078125 > tolerance 0.0010000000000000002

failures:
tests::ad_cos::tests::should_diff_cos
tests::ad_sin::tests::should_diff_sin

test result: FAILED. 640 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 11.82s

error: test failed, to rerun pass -p burn-wgpu --lib

@nathanielsimard
Copy link
Member

I seems to be a precision problem, we should probably aims to set the right precision for those tests.

@meteor-lsw
Copy link
Contributor Author

The current precision set for assert_approx_eq in these two tests is 3. Should we change the precision to 2 now?

@nathanielsimard
Copy link
Member

We could do that, or add another function similar to assert_approx_eq with a custom difference not forced to be a multiple of 10.

assert_approx_eq_diff(actual, expected, 2.5e-3)

@antimora antimora added the bug Something isn't working label Nov 12, 2023
@louisfd
Copy link
Member

louisfd commented Nov 13, 2023

Fixed in #954

@louisfd louisfd closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants