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

various numpy_test changes #21020

Merged
merged 2 commits into from
Mar 21, 2025
Merged

various numpy_test changes #21020

merged 2 commits into from
Mar 21, 2025

Conversation

fbadine
Copy link
Contributor

@fbadine fbadine commented Mar 12, 2025

This PR contains changes to numpy_test.py in order to:

  1. Forcing the following tests to run on CPU.
    • NumpyDtypeTest::test_correlate_*
    • NumpyDtypeTest::test_eye_int64
    • NumpyDtypeTest::test_identity_int64
      All tests are now successful
  2. Skipping the following tests because mlx.core.matmul does not support non-floating multiplication. This will eventually be supported by mlx (MLX Backend  #19571 (comment)) but not a top priority.
    • NumpyDtypeTest::test_einsum_*
    • NumpyDtypeTest::test_inner_*
    • NumpyDtypeTest::test_matmul_*
    • NumpyDtypeTest::test_tensordot_*
    • NumpyDtypeTest::test_dot_*
  3. Skipping the following tests that do not work on GPU ([BUG] Wrong argmin and argmax results on GPU in special cases of negative and positive zeros ml-explore/mlx#1895):
    • NumpyOneInputOpsDynamicShapeTest::test_argmax_negative_zero
    • NumpyOneInputOpsDynamicShapeTest::test_argmin_negative_zero

@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (mlx@89f6103). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             mlx   #21020   +/-   ##
======================================
  Coverage       ?   72.48%           
======================================
  Files          ?      572           
  Lines          ?    55890           
  Branches       ?     8623           
======================================
  Hits           ?    40513           
  Misses         ?    13431           
  Partials       ?     1946           
Flag Coverage Δ
keras 72.40% <ø> (?)
keras-jax 61.02% <ø> (?)
keras-numpy 56.09% <ø> (?)
keras-openvino 27.98% <ø> (?)
keras-tensorflow 61.52% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fbadine
Copy link
Contributor Author

fbadine commented Mar 13, 2025

This is part of #19571

Copy link
Collaborator

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM -- thank you!

@pytest.mark.skipif(
keras.config.backend() == "mlx",
reason="""
MLX flush denormal numbers to 0 on GPU resulting in wrong results.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please keep message on a single line.

@pytest.mark.skipif(
keras.config.backend() == "mlx",
reason="""
MLX flush denormal numbers to 0 on GPU resulting in wrong results.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Mar 20, 2025
@google-ml-butler google-ml-butler bot removed the ready to pull Ready to be merged into the codebase label Mar 21, 2025
@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Mar 21, 2025
@fchollet fchollet merged commit d630199 into keras-team:mlx Mar 21, 2025
5 of 8 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase kokoro:force-run labels Mar 21, 2025
@fbadine fbadine deleted the mlx_dtype branch March 24, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

5 participants