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

Fix a couple of slicing bugs #1827

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Fix a couple of slicing bugs #1827

merged 4 commits into from
Feb 6, 2025

Conversation

awni
Copy link
Member

@awni awni commented Feb 3, 2025

  • Fix bugs with end indices in slicing
  • Fix bug with negative slicing into slice update
  • Fix large unary kernel dispatch
  • Clean up some duplicate code in slice (eval_cpu and eval_gpu use the same code)
  • Add tests
  • Also fixes conv grad when flip= True

Closes #1826

Copy link
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the fixes!

mlx/backend/common/slicing.cpp Outdated Show resolved Hide resolved
@awni awni merged commit af1b725 into main Feb 6, 2025
5 checks passed
@awni awni deleted the fix_bugs branch February 6, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Incorrect gradient shapes with conv_general and flipped kernels
2 participants