Repository navigation
Require mlx 0.32.5 and drop the workarounds it fixes - #165
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mlx 0.32.5 fixes several Metal bugs we were working around, so this raises the floor to 0.32.5 and drops those workarounds.
anyandallstop casting int8 and uint8 to bool (Fix any/all for int8 and uint8 on Metal ml-explore/mlx#4755).sort,argsort,argpartitionand sizeduniquerun on Metal directly, without the int8 cast or the CPU stream, since sort.metal has bool kernels now.expm1callsmx.expm1. On Metal it was up to 671 ulp off on 0.32.4 and is under 1 ulp on [-20, 20] on 0.32.5.sparse_categorical_crossentropystops copying the logits beforemx.fast.cross_entropy(Fix fast.cross_entropy VJP on non-contiguous Metal inputs ml-explore/mlx#4702).argmaxandargminpasskeepdimsthrough for 0-d inputs, and the emptymax/minfill passesdtypetomx.full.test_reconstruct_patches_3dis back in the run (Fix contiguous flag after reshape and view ml-explore/mlx#4915).I checked each one against raw mlx on 0.32.4 and 0.32.5, on Metal and on the macOS and linux CPU. Most of the keras tests for these only look at dtypes, so the kernels never run.
integration_tests/metal_kernels_test.pychecks the values, including the conv kernel gradient of an empty batch, which 0.32.5 also fixes (ml-explore/mlx#4873), so #154 can be closed. Negative stride numpy views, empty reductions and the float to int cast are still broken on 0.32.5 and keep their workarounds.With #164 applied, on keras master d0aece6d3 and mlx 0.32.5, the linux suite passes. On Metal with compile on and off the only failure is the
test_logspacedrift from keras-team/keras#24305. CI here stays red until #164 merges.