-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 broadcast_tensors method to paddle.tensor.Tensor #25926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Checks Passed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on making your first Pull Request and thanks for supporting Ivy! 🎉
Join the conversation in our Discord
Here are some notes to understand our tests:
- We have merged all the tests in one file called `display_test_results` job. 👀 It contains the following two sections:
- Combined Test Results: This shows the results of all the ivy tests that ran on the PR. ✔️
- New Failures Introduced: This lists the tests that fails on this PR.
Please make sure they are passing. 💪
Keep in mind that we will assign an engineer for this task and they will look at it based on the workload that they have, kindly be patient 😄.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Tinny-Robot, thanks a lot for the PR. Couple of points to address.
- Can you please remove the
.ipynb_checkpoints
folders that you committed to this PR? They are not needed - Plenty of lint issues with the PR. Can you please fix them using
pre-commit
? - Make sure you run your test locally using
pytest
to ensure it runs and passes for all backends.
Kindly request a re-review from me once done. Thanks! :)
@with_supported_dtypes( | ||
{"2.5.1 and below": ("float16", "float32", "float64", "int8", "int16", "int32", "int64")}, | ||
"paddle", | ||
) | ||
def broadcast_tensors(self, name=None): | ||
return paddle_frontend.Tensor(ivy.broadcast_arrays(self._ivy_array)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block of code was not supposed to be added to this file. Can you remove this?
PR Description
Changes Made
Added the
broadcast_tensors
function to thepaddle.tensor.tensor.Tensor
class and included the equivalent test case.Details
broadcast_tensors
method to enable broadcasting operations for tensors in thepaddle.tensor.tensor.Tensor
class.This PR enhances the capabilities of the
paddle.tensor.tensor.Tensor
class by introducing thebroadcast_tensors
method and ensures its correctness through testing.Related Issue
Close #25869
Checklist
Socials: