Skip to content

"test random uniform" fails for CPU backend #3326

@zcbenz

Description

@zcbenz

On macOS/Windows the CPP tests would fail with:

$ DEVICE=cpu ./build/tests/tests -tc="test random uniform"
[doctest] doctest version is "2.4.12"
[doctest] run with "--help" for options
===============================================================================
/Users/zcbenz/codes/mlx/tests/random_tests.cpp:244:
TEST CASE:  test random uniform

/Users/zcbenz/codes/mlx/tests/random_tests.cpp:368: ERROR: CHECK( abs(float(mean(out).item<bfloat16_t>()) - 0.5f) < 0.02 ) is NOT correct!
  values: CHECK( 0.244141 <  0.02 )

===============================================================================
[doctest] test cases:  1 |  0 passed | 1 failed | 239 skipped
[doctest] assertions: 33 | 32 passed | 1 failed |
[doctest] Status: FAILURE!

which was caused by #2361, but I'm not exactly sure where the bug is. /cc @angeloskath

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions