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: fixed frontend test test_torch_unfold for paddle backend #28601

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

ZenithFlux
Copy link
Contributor

@ZenithFlux ZenithFlux commented Mar 14, 2024

PR Description

  • Parameter 's' of '_parse_slice' is converted to int when the function is called. Reason: Sometimes a ivy.Array was being passed as 's' which caused ivy.arange to throw an error.
  • Added an assumption so that bfloat arrays are not passed to the function when testing paddle backend. Reason: When paddle backend is set, one of the functions called inside the frontend function does not accept bfloat dtype. Since a direct backend implementation is not called, I could not restrict dtypes through decorators.

Related Issue

Closes #28600

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?

@ivy-leaves ivy-leaves added Ivy Functional API PyTorch Frontend Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist labels Mar 14, 2024
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.

Hi @ZenithFlux
Thank you very much for the PR.
Two requests
the fix in parse slice might be irrelevant as this helper might disappear after merging of #28582
dtype filtering should be done on the function in the respective backend/frontend using supported or unsupported dtype decorator. Hope that makes sense :)

@ZenithFlux ZenithFlux force-pushed the fixing_test_torch_unfold branch from b875d5a to 084bbc9 Compare March 16, 2024 16:43
@ZenithFlux
Copy link
Contributor Author

ZenithFlux commented Mar 16, 2024

@Ishticode The decorator is not working for this case. This was acknowledged by vedpatwardhan in Discord. This is a temporary fix for now. If this fix should not be merged, I can close this PR and pick another issue.

I have removed parse slice fix.

@ZenithFlux ZenithFlux requested a review from Ishticode March 16, 2024 16:52
Added an assumption so that bfloat arrays are not passed to paddle backend.
@ZenithFlux ZenithFlux force-pushed the fixing_test_torch_unfold branch from 084bbc9 to ceb2612 Compare March 19, 2024 16:28
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.

Sure fair enough. Otherwise looks good then. Thank you very much for the PR and I will merge this soon today. :)

@Ishticode Ishticode merged commit a2b5fc6 into ivy-llc:main Mar 21, 2024
136 of 141 checks passed
@ZenithFlux ZenithFlux deleted the fixing_test_torch_unfold branch March 21, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ivy Functional API PyTorch Frontend Developing the PyTorch Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Frontend Failing Test: paddle - convolution_functions.torch.nn.functional.unfold
3 participants