fix: support 64-bit eye on GPU - #4301
Open
aaishwarymishra wants to merge 1 commit into
Open
Conversation
This was referenced Aug 16, 2026
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.
Proposed changes
Please include a description of the problem or feature this PR is addressing. If there is a corresponding issue, include the issue #.
This pull request updates the
eyefunction to improve support for 64-bit data types and adds corresponding tests to ensure correct behavior. The main changes include handling for 64-bit integer types in the implementation and new test cases for these types.Enhanced dtype support:
eyefunction inmlx/ops.cppto handle 64-bit data types by constructing the eye matrix asfloat32and then converting it to the requested 64-bit type. This ensures compatibility withint64anduint64dtypes.Testing improvements:
python/tests/test_ops.pyto verify thatmx.eyecorrectly returns arrays ofint64anduint64dtypes.closes #4300
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes