[Feature] Elementwise operator complex_tensor.normalize() #38074
Labels
module: complex
Related to complex number support in PyTorch
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Uh oh!
There was an error while loading. Please reload this page.
🚀 Feature
This elementwise operator converts each complex number
R * exp(i * theta)
toexp(i * theta)
.I am just feeling that having this operator will be convenient, and it is easy to implement such an operator using TensorIterator, and it could be implemented much faster than
t / t.abs()
on CUDA (native implementation of normalize has 1 memory read, 1 memory write, whilet/t.abs()
has 3 memory reads and 2 memory writes).cc @ezyang @anjali411 @dylanbespalko
The text was updated successfully, but these errors were encountered: