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: use primary get_item implementation for 1d tensor queries with tf, and added a test for partial_mixed_handler to check for this #28456

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

mattbarrett98
Copy link
Contributor

@mattbarrett98 mattbarrett98 commented Feb 29, 2024

This gets around an issue with kornia, where the compositional get_item is causing issues with tf.function (as well as efficiency issues)

Think i've found an even more efficient implementation by using tf.gather when the query is a tensor of any dimension, which will cause it to defer to the more efficient primary implementation for an even wider array of cases (assuming tests still work)

Copy link
Contributor

@Ishticode Ishticode 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 i think. very few new failures it seems to work for most and nothing exploded 😂but best to merge for now.

Copy link
Contributor

@vedpatwardhan vedpatwardhan left a comment

Choose a reason for hiding this comment

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

Hey @mattbarrett98, get_item seems to be failing with the tensorflow backend, could you please check if the failure's related to the changes made? Thanks and apologies for the delayed review 😅

Copy link
Contributor

@vedpatwardhan vedpatwardhan left a comment

Choose a reason for hiding this comment

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

lgtm! Feel free to merge, thanks @mattbarrett98 @Ishticode 😄

@mattbarrett98 mattbarrett98 merged commit 2c11f9f into ivy-llc:main Mar 4, 2024
111 of 141 checks passed
@mattbarrett98 mattbarrett98 deleted the gt branch March 4, 2024 10:05
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.

3 participants