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

feat: Add tensorflow GatherNd raw_ops #27745

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

TalhaKhalil
Copy link
Contributor

PR Description

Related Issue

Closes #27443

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Socials

@ivy-leaves ivy-leaves added the TensorFlow Frontend Developing the TensorFlow Frontend, checklist triggered by commenting add_frontend_checklist label Dec 13, 2023
@TalhaKhalil
Copy link
Contributor Author

Hi @he11owthere,

Hope you are doing well,

So, I had implemented GatherNd in raw ops for tensorflow. But the issue I am currently facing is that out of 5 tests sometimes 4 or 3 are passing.
I am not quite sure what the problem is exactly and why they are not passing 100%.

Would really appreciate if you could help me out with this.

Copy link
Contributor

@he11owthere he11owthere left a comment

Choose a reason for hiding this comment

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

Hello @TalhaKhalil, correct me if I am wrong but I think indices must have at least as many dimensions as the input tensor.
Try using these values:

min_num_dims=1,
max_num_dims=5,
min_dim_size=1,
max_dim_size=10,
indices_same_dims=True,

@TalhaKhalil
Copy link
Contributor Author

@he11owthere I changed these parameters in the test function but as of now none of the tests are passing

@he11owthere
Copy link
Contributor

he11owthere commented Dec 20, 2023

@he11owthere I changed these parameters in the test function but as of now none of the tests are passing

For me, all the tests are passing with these values:

min_num_dims=3,
max_num_dims=3,
min_dim_size=3,
max_dim_size=3,
axis_zero=True,
disable_random_axis=True,
indices_same_dims=True,

The issue is that indices are sometimes trying to access invalid dimensions since the overall shape of the tensor might differ for both the params as well as indices and they are so much dependent on each other while we are trying to generate their values.
After making these changes, you will have to include a with_supported_dtypes decorator and add appropriate data types after running the tests.

@TalhaKhalil
Copy link
Contributor Author

@he11owthere Can you tell me the the data types to be included along with the decorator with_supported_dtypes .

@he11owthere
Copy link
Contributor

he11owthere commented Dec 20, 2023

@he11owthere Can you tell me the the data types to be included along with the decorator with_supported_dtypes .

You will have to run the tests and will face errors regarding unsupported data types like int16 is not supported by some backend so you will get to know which data types are supported and which are not. For now, add int32, int64, float32 and float64 data types inside that decorator.

@NripeshN NripeshN merged commit 252047c into ivy-llc:main Feb 7, 2024
251 of 277 checks passed
NripeshN added a commit that referenced this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TensorFlow Frontend Developing the TensorFlow Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GatherNd
5 participants