Repository: pytorch
Issue: [jiterator] Jiterate Complex Ops
Labels: triaged,module: complex,module: jiterator

### 🐛 Describe the bug

With `jiterator` machinery now available, we can use it to remove the ahead of time compilation cost and decrease the CUDA context size introduced by complex dtypes wherever possible.

This issue tracks ops that can potentially be jiterated (mostly unary, binary, pointwise and reduction ops).

**NOTE**: 
* Not all ops should be jiterated (eg. ops which just change shape or stride meta-data)
* Some ops which call into external library can't be jiterated.
* List doesn't directly cover private and backward ops.

(Below list is compiled from OpInfo for ops which support complex dtypes)

* [ ] \_\_radd\_\_
* [ ] \_\_rdiv\_\_
* [ ] \_\_rmatmul\_\_
* [ ] \_\_rmul\_\_
* [ ] \_\_rpow\_\_
* [ ] \_\_rsub\_\_
* [ ] _masked.mean
* [ ] _masked.prod
* [ ] _masked.sum
* [ ] _masked.var
* [x] abs
* [ ] acos
* [ ] acosh
* [ ] addbmm
* [ ] addcdiv
* [x] addcmul
* [ ] addmm
* [ ] addmv
* [ ] addr
* [ ] allclose
* [ ] angle
* [ ] any
* [ ] argwhere
* [ ] as_strided
* [ ] asin
* [ ] asinh
* [ ] atan
* [ ] atanh
* [ ] atleast_1d
* [ ] atleast_2d
* [ ] atleast_3d
* [ ] baddbmm
* [ ] bfloat16
* [ ] block_diag
* [ ] bmm
* [ ] bool
* [ ] broadcast_tensors
* [ ] broadcast_to
* [ ] byte
* [ ] cartesian_prod
* [ ] cat
* [ ] char
* [ ] cholesky
* [ ] cholesky_inverse
* [ ] cholesky_solve
* [ ] chunk
* [ ] clone
* [ ] column_stack
* [ ] combinations
* [ ] conj
* [ ] conj_physical
* [ ] contiguous
* [ ] corrcoef
* [ ] cos
* [ ] cosh
* [ ] count_nonzero
* [ ] cov
* [ ] cross
* [ ] cumprod
* [ ] cumsum
* [ ] cumulative_trapezoid
* [ ] diag
* [ ] diag_embed
* [ ] diagflat
* [ ] diagonal
* [ ] diff
* [ ] dist
* [ ] dot
* [ ] double
* [ ] dsplit
* [ ] dstack
* [ ] eig
* [ ] einsum
* [ ] empty_like
* [ ] eq
* [x] exp
* [ ] expand
* [ ] expand_as
* [ ] flatten
* [ ] flip
* [ ] fliplr
* [ ] flipud
* [ ] float
* [ ] float_power
* [ ] full_like
* [ ] gather
* [ ] geqrf
* [ ] gradient
* [ ] half
* [ ] hsplit
* [ ] hstack
* [ ] index_add
* [ ] index_copy
* [ ] index_fill
* [ ] index_put
* [ ] index_select
* [ ] inner
* [ ] int
* [ ] inverse
* [ ] isclose
* [ ] isfinite
* [ ] isinf
* [ ] isnan
* [ ] isreal
* [ ] istft
* [ ] kron
* [ ] ldexp
* [ ] lerp
* [ ] linalg.cholesky
* [ ] linalg.cholesky_ex
* [ ] linalg.cond
* [ ] linalg.cross
* [ ] linalg.det
* [ ] linalg.eig
* [ ] linalg.eigh
* [ ] linalg.eigvals
* [ ] linalg.eigvalsh
* [ ] linalg.householder_product
* [ ] linalg.inv
* [ ] linalg.inv_ex
* [ ] linalg.lstsq
* [ ] linalg.lu_factor
* [ ] linalg.lu_factor_ex
* [ ] linalg.matrix_norm
* [ ] linalg.matrix_power
* [ ] linalg.matrix_rank
* [ ] linalg.multi_dot
* [ ] linalg.norm
* [ ] linalg.pinv
* [ ] linalg.qr
* [ ] linalg.slogdet
* [ ] linalg.solve
* [ ] linalg.solve_triangular
* [ ] linalg.svd
* [ ] linalg.svdvals
* [ ] linalg.tensorinv
* [ ] linalg.tensorsolve
* [ ] linalg.vector_norm
* [x] log
* [x] log10
* [x] log2
* [ ] log_softmax
* [ ] logical_and
* [ ] logical_not
* [ ] logical_or
* [ ] logical_xor
* [ ] long
* [ ] lu
* [ ] lu_solve
* [ ] lu_unpack
* [ ] mH
* [ ] mT
* [ ] masked_fill
* [ ] masked_scatter
* [ ] masked_select
* [ ] matmul
* [ ] matrix_exp
* [ ] meshgrid
* [ ] mm
* [ ] movedim
* [ ] mv
* [ ] narrow
* [ ] ne
* [ ] neg
* [ ] new_empty
* [ ] new_full
* [ ] new_ones
* [ ] new_zeros
* [ ] nn.functional.feature_alpha_dropout
* [ ] nn.functional.linear
* [ ] nn.functional.normalize
* [ ] nn.functional.pad
* [ ] nn.functional.pairwise_distance
* [ ] nn.functional.pixel_shuffle
* [ ] nn.functional.pixel_unshuffle
* [ ] nn.functional.silu
* [ ] nn.functional.softmin
* [ ] nn.functional.softsign
* [ ] nn.functional.tanhshrink
* [ ] nn.functional.unfold
* [ ] nonzero
* [ ] norm
* [ ] ones_like
* [ ] ormqr
* [ ] outer
* [ ] permute
* [ ] pinverse
* [ ] positive
* [ ] pow
* [ ] prod
* [ ] put
* [ ] qr
* [ ] rand_like
* [ ] randn_like
* [ ] ravel
* [ ] reciprocal
* [ ] renorm
* [ ] repeat
* [ ] repeat_interleave
* [ ] reshape
* [ ] reshape_as
* [ ] resize_
* [ ] resize_as_
* [ ] resolve_conj
* [ ] resolve_neg
* [ ] roll
* [ ] rot90
* [x] rsqrt
* [ ] rsub
* [ ] scatter
* [ ] scatter_add
* [ ] select
* [ ] sgn
* [ ] short
* [x] sigmoid
* [ ] sin
* [ ] sinc
* [ ] sinh
* [ ] softmax
* [ ] solve
* [ ] split
* [ ] split_with_sizes
* [x] sqrt
* [ ] square
* [ ] squeeze
* [ ] stack
* [ ] std
* [ ] std_mean
* [ ] sum_to_size
* [ ] svd
* [ ] symeig
* [ ] t
* [ ] take
* [ ] take_along_dim
* [ ] tan
* [ ] tanh
* [ ] tensor_split
* [ ] tensordot
* [ ] tile
* [ ] to_sparse
* [ ] trace
* [ ] transpose
* [ ] trapezoid
* [ ] trapz
* [ ] triangular_solve
* [ ] tril
* [ ] triu
* [ ] true_divide
* [ ] unfold
* [ ] unsqueeze
* [ ] var
* [ ] var_mean
* [ ] vdot
* [ ] view
* [ ] view_as
* [ ] view_as_real
* [ ] vsplit
* [ ] vstack
* [ ] where
* [ ] zero_
* [ ] zeros_like

cc: @anjali411   

### Versions

master

cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @ngimel