pytorch/torch/_decomp
Ken Jin c458fa0d35 Decompose/add reference for view_as_complex (#108005)
Aten source: d4a99631dd/aten/src/ATen/native/ComplexHelper.h (L78)

Documentation reference:
https://pytorch.org/docs/stable/generated/torch.view_as_complex.html

Note: this adds a new primitive `view_of_dtype`, which is trivially implemented, as its meta function is already implemented elsewhere.

Finally, this is not registered as a decomposition (yet), because TorchInductor does not yet support complex types. It should be added once we do.

Closes https://github.com/pytorch/pytorch/issues/108020 as well.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/108005
Approved by: https://github.com/peterbell10, https://github.com/ezyang
2023-09-07 23:49:20 +00:00
..
__init__.py Decompose/add reference for view_as_complex (#108005) 2023-09-07 23:49:20 +00:00
decompositions_for_jvp.py Allow registering decomps for HigherOrderOp; add decomp for out_dtype (#108080) 2023-08-31 03:15:38 +00:00
decompositions_for_rng.py Implement decomposition for aten.rrelu_with_noise (#106812) 2023-08-11 19:18:29 +00:00
decompositions.py Add torch._check_is_size (#108685) 2023-09-07 12:48:39 +00:00