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 broadcast_tensors method to paddle.tensor.Tensor #25926

Closed
wants to merge 1 commit into from

Conversation

Tinny-Robot
Copy link

@Tinny-Robot Tinny-Robot commented Sep 22, 2023

PR Description

Changes Made

Added the broadcast_tensors function to the paddle.tensor.tensor.Tensor class and included the equivalent test case.

Details

  • Implemented the broadcast_tensors method to enable broadcasting operations for tensors in the paddle.tensor.tensor.Tensor class.
  • Added a corresponding test case to ensure the functionality of the newly added method.

This PR enhances the capabilities of the paddle.tensor.tensor.Tensor class by introducing the broadcast_tensors method and ensures its correctness through testing.

Related Issue

Close #25869

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:

Copy link
Contributor

@github-actions github-actions bot left a 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!

@Tinny-Robot Tinny-Robot changed the title implemented broadcast_tensors in paddle.tensor.tensor.Tensor Add broadcast_tensors method to paddle.tensor.Tensor Sep 22, 2023
Copy link
Contributor

@github-actions github-actions bot left a 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 😄.

@Tinny-Robot Tinny-Robot changed the title Add broadcast_tensors method to paddle.tensor.Tensor feat: Add broadcast_tensors method to paddle.tensor.Tensor Sep 22, 2023
@ivy-leaves ivy-leaves added the Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist label Sep 22, 2023
Copy link
Contributor

@hmahmood24 hmahmood24 left a 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.

  1. Can you please remove the .ipynb_checkpoints folders that you committed to this PR? They are not needed
  2. Plenty of lint issues with the PR. Can you please fix them using pre-commit?
  3. 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! :)

Comment on lines +1116 to +1121
@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))
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

broadcast_tensors
3 participants