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)(TF backend): optimized the backend implementation of ivy.linear for TF backend to make use of tf.matmul for the 2D input case #27733

Merged
merged 7 commits into from
Dec 20, 2023

Conversation

YushaArif99
Copy link
Contributor

Rewrote the implementation to use the classic (x*w.T + b) formula instead of the more sophisticated tf.einsum op which was also causing a huge slowdown during training.

PR Description

Related Issue

Closes #

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

…assic (x*w.T + b) instead of the more sophisticated tf.einsum op which was also causing a huge slowdown during training.
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

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Issue Reference

In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our contributing guide and our PR template.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.

Conventional Commit PR Title

In order to be considered for merging, the pull request title must match the specification in conventional commits. You can edit the title in order for this check to pass.
Most often, our PR titles are something like one of these:

  • docs: correct typo in README
  • feat: implement dark mode"
  • fix: correct remove button behavior

Linting Errors

  • Found type "null", must be one of "feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"

@YushaArif99 YushaArif99 added Ivy Stateful API Run CI for stateful tests and removed Ivy Stateful API Run CI for stateful tests labels Dec 11, 2023
@YushaArif99 YushaArif99 changed the title (fix)(TF backend): rewrote the backend implementation of ivy.linear for TF backend (fix)(TF backend): optimized the backend implementation of ivy.linear for TF backend to make use of tf.matmul for the 2D input case Dec 20, 2023
@YushaArif99 YushaArif99 merged commit 979b519 into main Dec 20, 2023
137 of 146 checks passed
@YushaArif99 YushaArif99 deleted the tf_linear branch December 20, 2023 06:28
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.

1 participant