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

Optimizing scatter_nd_* for complex tensors #40672

Closed
zaccharieramzi opened this issue Jun 22, 2020 · 1 comment
Closed

Optimizing scatter_nd_* for complex tensors #40672

zaccharieramzi opened this issue Jun 22, 2020 · 1 comment
Assignees
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower type:feature Feature requests

Comments

@zaccharieramzi
Copy link
Contributor

System information

  • TensorFlow version (you are using): 2.2
  • Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.

Currently, as noted in #40605 , the scatter_nd_* functions are extremely slow.

However, this is even more extreme when used on complex tensors. This colab notebook illustrates this fact.

A simple hack consisting in treating separately real and imaginary parts makes us gain a factor 20 on computation time.

I guess at least this hack could be implemented at the python level of the op, a part on which I am definitely willing to contribute.

Will this change the current api? How?

No

Who will benefit with this feature?

Everyone using complex tensors, so I would say people working in sound processing and MRI, but this is surely not exhaustive.

Any Other info.

I don't know if this is due to eager execution or not. I don't necessarily know how to best profile these kind of issues in graph mode.

I think even if this is eager-related it still deserves a fix.

@zaccharieramzi zaccharieramzi added the type:feature Feature requests label Jun 22, 2020
@Saduf2019 Saduf2019 added the comp:ops OPs related issues label Jun 22, 2020
@Saduf2019 Saduf2019 assigned gowthamkpr and unassigned Saduf2019 Jun 22, 2020
@gowthamkpr gowthamkpr added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jun 22, 2020
@zaccharieramzi
Copy link
Contributor Author

For the latest nightly release (2.4.0dev-20200708), it seems that this problem is not present anymore (see the same colab).

This PR solved a problem related to tf 2.3, and maybe some other issue with scatter_nd_* was solved in tf 2.3.

Closing this since it's not relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower type:feature Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants