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 the logical_not not support the bfloat16 #28455

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

samthakur587
Copy link
Contributor

@samthakur587 samthakur587 commented Feb 28, 2024

fixed the logical_not not support the bfloat16 at paddle backend

fix support for bfloat16 at paddle backend that the paddle doesn't support the bfloat16 dtype and removed the `python if paddle.is_complex(x):

    return paddle.logical_and(
        paddle.logical_not(x.real()), paddle.logical_not(x.imag())
    ) # the paddle itself support the complex dtype for paddle.logical_not `

passing all tests at local.

image

Closes #28454

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?

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 Sam. Thanks for the PR.

def logical_not(
x: paddle.Tensor, /, *, out: Optional[paddle.Tensor] = None
) -> paddle.Tensor:
if paddle.is_complex(x):
Copy link
Contributor

@Ishticode Ishticode Mar 8, 2024

Choose a reason for hiding this comment

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

we seem to be removing the complex dtype handling. So is complex unsupported now or does it still work?
if it is unsupported then it should be marked in the unsupported dtype decorator above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it's working bcz the paddle.logical_not can handle the complex dtype also. here the paddle doc for this and i have tested this passing all tests in local.

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.

Thanks @samthakur587
Will merge soon

@Ishticode Ishticode merged commit 3829154 into Transpile-AI:main Mar 11, 2024
253 of 277 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix ivy.logical_not support for bfloat16 at paddle backend
3 participants