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

ComplexHalf Coverage Tracker #74537

Open
kshitij12345 opened this issue Mar 22, 2022 · 1 comment
Open

ComplexHalf Coverage Tracker #74537

kshitij12345 opened this issue Mar 22, 2022 · 1 comment
Assignees
Labels
feature A request for a proper, new feature. module: complex Related to complex number support in PyTorch module: half Related to float16 half-precision floats triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@kshitij12345
Copy link
Collaborator

kshitij12345 commented Mar 22, 2022

🚀 The feature, motivation and pitch

There have been multiple requests and issues (see #71680) to have better operator support for complex32. Currently it is almost impossible to do anything with a Tensor of complex32 dtype (even printing doesn't work).

All operators which support complex dtypes should ideally support complex32. Computation will occur in complex64 similar to Half wherein computation occurs in float.

NOTE : Math op support will mostly be enabled only on CUDA

Following is the operator coverage:

Fundamental Ops (expected 1.12)

NOTE: List will be updated if supporting above list requires supporting another operator

High-Priority Ops (based on user demand)

High-Priority Ops (expected 1.12)

Tensor Creation Ops:

  • randn (supported, needs tests)
  • rand (supported, needs tests)
  • empty (supported, needs tests)
  • full (supported, needs tests)
  • ones (supported, needs tests)
  • zeros (supported, needs tests)
  • linspace
  • logspace
  • arange
  • eye

Remaining Operators which support complex type (generated from OpInfo)

  • __radd__
  • __rdiv__
  • __rmatmul__
  • __rmul__
  • __rpow__
  • __rsub__
  • _masked.mean
  • _masked.prod
  • _masked.sum
  • _masked.var
  • abs
  • acos
  • acosh
  • addbmm
  • addcdiv
  • 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
  • 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 (won't support)
  • linalg.cholesky_ex (won't support)
  • linalg.cond (won't support)
  • linalg.cross (won't support)
  • linalg.det (won't support)
  • linalg.eig (won't support)
  • linalg.eigh (won't support)
  • linalg.eigvals (won't support)
  • linalg.eigvalsh (won't support)
  • linalg.householder_product (won't support)
  • linalg.inv (won't support)
  • linalg.inv_ex (won't support)
  • linalg.lstsq (won't support)
  • linalg.lu_factor (won't support)
  • linalg.lu_factor_ex (won't support)
  • linalg.matrix_norm (won't support)
  • linalg.matrix_power (won't support)
  • linalg.matrix_rank (won't support)
  • linalg.multi_dot (won't support)
  • linalg.norm (won't support)
  • linalg.pinv (won't support)
  • linalg.qr (won't support)
  • linalg.slogdet (won't support)
  • linalg.solve (won't support)
  • linalg.solve_triangular (won't support)
  • linalg.svd (won't support)
  • linalg.svdvals (won't support)
  • linalg.tensorinv (won't support)
  • linalg.tensorsolve (won't support)
  • linalg.vector_norm (won't support)
  • log
  • log10
  • 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
  • rsqrt
  • rsub
  • scatter
  • scatter_add
  • select
  • sgn
  • short
  • sigmoid
  • sin
  • sinc
  • sinh
  • softmax
  • solve
  • split
  • split_with_sizes
  • 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

Misc:

  • Fix tests in test_torch.py
    • test_copy_all_dtypes_and_devices -> Fails due to copy(x) (unsupported storage type )
    • test_copy_math_view -> Uses make_tensor
    • test_copy_transpose_math_view -> Uses make_tensor
    • (maybe?)test_copy_noncontig -> Tests only 1 dtype
    • (maybe?)test_copy_broadcast -> Tests only 1 dtype

cc: @anjali411

Alternatives

No response

Additional context

No response

cc @ezyang @anjali411 @dylanbespalko @mruberry @lezcano @nikitaved

@kshitij12345 kshitij12345 added module: complex Related to complex number support in PyTorch module: half Related to float16 half-precision floats labels Mar 22, 2022
@kshitij12345 kshitij12345 self-assigned this Mar 22, 2022
@ezyang
Copy link
Contributor

ezyang commented Mar 22, 2022

Probably prime candidate for being JITerated by default.

@VitalyFedyunin VitalyFedyunin added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module feature A request for a proper, new feature. labels Mar 25, 2022
pytorchmergebot pushed a commit that referenced this issue Mar 28, 2022
facebook-github-bot pushed a commit that referenced this issue Mar 29, 2022
Summary:
Reference: #74537
Pull Request resolved: #74667
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/56e534094715e411009650c0596766b7d0ffcdfa

Reviewed By: malfet

Differential Revision: D35188060

fbshipit-source-id: d341247700aed345c4f4dab4396ded5d25871a6b
pytorchmergebot pushed a commit that referenced this issue Apr 1, 2022
Reference : #74537

`cat_backwards` (on CUDA) requires support for `fill`, have added support for `fill`. (Also `fill` requires `item` support)

Now `fill` backward requires `sum` (will add it in later PR).
Pull Request resolved: #75010
Approved by: https://github.com/anjali411
facebook-github-bot pushed a commit that referenced this issue Apr 4, 2022
Summary:
Reference : #74537

`cat_backwards` (on CUDA) requires support for `fill`, have added support for `fill`. (Also `fill` requires `item` support)

Now `fill` backward requires `sum` (will add it in later PR).

Pull Request resolved: #75010
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/65b65af2367c451a88672e9cffd40bd839d7ccb7

Reviewed By: atalman

Differential Revision: D35317407

fbshipit-source-id: f735f5090539a4f598b413a3c40181a10bd0ad58
pytorchmergebot pushed a commit that referenced this issue Apr 6, 2022
pytorchmergebot pushed a commit that referenced this issue Apr 6, 2022
Reference #74537
Pull Request resolved: #75311
Approved by: https://github.com/anjali411
facebook-github-bot pushed a commit that referenced this issue Apr 7, 2022
Summary:
Reference #74537

Pull Request resolved: #75156
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/1b3313f2cd03e68b14d942a9a2301a2cd14bcbec

Reviewed By: b0noI

Differential Revision: D35437862

fbshipit-source-id: 3d6ee93894376e39724dc2fc1aa4ed90795bf9bd
facebook-github-bot pushed a commit that referenced this issue Apr 7, 2022
Summary:
Reference #74537

Pull Request resolved: #75311
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/b780e8a640da5380a5b8fe1956af3578ffdd67fe

Reviewed By: b0noI

Differential Revision: D35437866

fbshipit-source-id: e7b98517f1899604b756802e5102c44c59b9e5cc
pytorchmergebot pushed a commit that referenced this issue Apr 8, 2022
pytorchmergebot pushed a commit that referenced this issue Apr 11, 2022
facebook-github-bot pushed a commit that referenced this issue Apr 11, 2022
Summary:
Reference: #74537

Pull Request resolved: #75498
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/dfa1d953c6e38c59e97a12dee75fac0838509c09

Reviewed By: b0noI

Differential Revision: D35510877

fbshipit-source-id: 1228454d68f2bcfdd6991124851b170199d6b4ad
facebook-github-bot pushed a commit that referenced this issue Apr 11, 2022
Summary:
Reference: #74537

Pull Request resolved: #75592
Approved by: https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/1a85699c03f902af23a9d2ddaae525fe4e077dbe

Reviewed By: b0noI

Differential Revision: D35550117

fbshipit-source-id: c1de082d4e2daf1eb1fad0b10625f7920387c817
pytorchmergebot pushed a commit that referenced this issue Apr 19, 2022
Reference #74537

Support for jiterating with `c10::complex<Half>`. Note that computation will take place in `complex<float>` by allowing implicit casting in JITerated code (similar to Half and BFloat16 which upcast to float for computation).

We add `complex32` support for `sigmoid` and `sigmoid_backward` in this PR. This is tested with `test_ops.py::test_dtypes and test_ops.py::test_complex_half_reference_testing`

Pull Request resolved: #75656
Approved by: https://github.com/ngimel
facebook-github-bot pushed a commit that referenced this issue Apr 19, 2022
Summary:
Reference #74537

Support for jiterating with `c10::complex<Half>`. Note that computation will take place in `complex<float>` by allowing implicit casting in JITerated code (similar to Half and BFloat16 which upcast to float for computation).

We add `complex32` support for `sigmoid` and `sigmoid_backward` in this PR. This is tested with `test_ops.py::test_dtypes and test_ops.py::test_complex_half_reference_testing`

Pull Request resolved: #75656
Approved by: https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e23cbd633f03af6ef311361b885d5d8e4a9a0f17

Reviewed By: seemethere

Differential Revision: D35751447

fbshipit-source-id: 9ab0d5a528d7599e8ebeb190f0493e29a90c7169
malfet pushed a commit that referenced this issue Apr 20, 2022
Reference #74537

Support for jiterating with `c10::complex<Half>`. Note that computation will take place in `complex<float>` by allowing implicit casting in JITerated code (similar to Half and BFloat16 which upcast to float for computation).

We add `complex32` support for `sigmoid` and `sigmoid_backward` in this PR. This is tested with `test_ops.py::test_dtypes and test_ops.py::test_complex_half_reference_testing`

Pull Request resolved: #75656
Approved by: https://github.com/ngimel

(cherry picked from commit e23cbd6)
facebook-github-bot pushed a commit that referenced this issue May 25, 2022
Summary:
Follows #74537 and #74748

cc kshitij12345

Pull Request resolved: #77606
Approved by: https://github.com/kshitij12345, https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/6f4d2007255a7606e80492b063fed2fe672a5bd8

Reviewed By: mehtanirav

Differential Revision: D36633663

fbshipit-source-id: 875cf9cf0402bf3d611f2345d385c14ef2cf0018
swang392 pushed a commit that referenced this issue May 25, 2022
swang392 pushed a commit that referenced this issue May 25, 2022
pytorchmergebot pushed a commit that referenced this issue Jun 2, 2022
facebook-github-bot pushed a commit that referenced this issue Jun 3, 2022
Summary:
Reland: #77640
Ref: #74537

Pull Request resolved: #78665
Approved by: https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/849b08f14b2a741d0b90bb7bfce0ebb3d07d1981

Reviewed By: b0noI

Differential Revision: D36882243

fbshipit-source-id: d9272da1541e99a8226560d8de6a3da32e889bc1
pytorchmergebot pushed a commit that referenced this issue Jun 6, 2022
facebook-github-bot pushed a commit that referenced this issue Jun 7, 2022
Summary:
Follows #74537

cc kshitij12345!

Pull Request resolved: #77490
Approved by: https://github.com/ngimel

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e7b96ad0786739e8b3d559d417bb7d0c9645bec5

Reviewed By: osalpekar

Differential Revision: D36959220

Pulled By: osalpekar

fbshipit-source-id: 27deac39868b7ca79deddeb9779e50d114c5e804
facebook-github-bot pushed a commit that referenced this issue Jun 8, 2022
Summary:
Ref: #78458
Follows: #74537 and #74748

cc kshitij12345 anjali411 :)

Pull Request resolved: #78718
Approved by: https://github.com/anjali411, https://github.com/kshitij12345

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/5b32c34450d69d677d2e721059e381134303b3fa

Reviewed By: osalpekar

Differential Revision: D37010871

Pulled By: osalpekar

fbshipit-source-id: 1f63f299bb25140d5538be6c602bdd67f6bf8ddd
facebook-github-bot pushed a commit that referenced this issue Jun 15, 2022
Summary:
Follows #74537

cc kshitij12345

Pull Request resolved: #78062
Approved by: https://github.com/kshitij12345, https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/56805881938f6a986aaa2554df7591bd9d046eb2

Reviewed By: malfet

Differential Revision: D37119137

fbshipit-source-id: 9b1f9577bc1241c9b5b5ad70eb287d725ba73dfc
facebook-github-bot pushed a commit that referenced this issue Jun 30, 2022
Summary:
Ref: #74537

Pull Request resolved: #79970
Approved by: https://github.com/peterbell10, https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/f2587849dbbf51d2d53b8440a002b66734d177e8

Reviewed By: b0noI

Differential Revision: D37496052

fbshipit-source-id: 499e867bf4244df7d6d892983ef1c9e8e9954982
facebook-github-bot pushed a commit that referenced this issue Jul 5, 2022
Summary:
Follows: #74537 and #74748

cc kshitij12345 anjali411 :)

Pull Request resolved: #80030
Approved by: https://github.com/kshitij12345, https://github.com/anjali411

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/7002621a4f3b7a8d1f0fb49a6ca257d4f9b5326f

Reviewed By: b0noI

Differential Revision: D37578914

fbshipit-source-id: 8a1967bd1e56bae573ac1666fcc582df1e193333
pytorchmergebot pushed a commit that referenced this issue Nov 30, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this issue Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A request for a proper, new feature. module: complex Related to complex number support in PyTorch module: half Related to float16 half-precision floats triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants