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

lower complex number operations (view_as_real, view_as_complex, conj, abs) #3070

Open
pitneitemeier opened this issue Aug 4, 2021 · 4 comments
Labels
nostale Do not consider for staleness op lowering

Comments

@pitneitemeier
Copy link

pitneitemeier commented Aug 4, 2021

🚀 Feature

Multiple operations on complex numbers default to cpu (visible by aten:: in metrics report) or just do not work.
Specifically I have found:
defaulting to cpu:

  • torch.real(x), x.real
  • torch.imag(x) x.imag
  • torch.conj(x)

not working:

  • torch.abs(x) when x.requires_grad==True
    prints: abs does not support automatic differentiation for outputs with complex dtype

There are probably many more that I have not found and i am happy to add to this list if other people finde more.

This is my First Issue so feel free to tell me if any Information is missing, or additional steps I can take.

@JackCaoG
Copy link
Collaborator

JackCaoG commented Aug 4, 2021

Lowering real and imag are pretty easy but lowering them as a view operator is a bit tircky. @bdhirsh Do you think it would make sense to wait for your functionalization change. Real and imag also changes dtype of the tensor (complexfloat -> f32 for example) which makes it a bit more tricky.

@stale
Copy link

stale bot commented Sep 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Has not had recent activity label Sep 7, 2021
@JackCaoG JackCaoG added the nostale Do not consider for staleness label Sep 7, 2021
@stale stale bot removed the stale Has not had recent activity label Sep 7, 2021
@jeffhataws
Copy link
Collaborator

Hi @JackCaoG do you know if this is already fixed?

@JackCaoG
Copy link
Collaborator

hmm I am not sure, if you use nightly do you see this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nostale Do not consider for staleness op lowering
Projects
None yet
Development

No branches or pull requests

3 participants