The Wayback Machine - https://web.archive.org/web/20201101013619/https://github.com/pytorch/pytorch/issues/46982
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

Mean_cuda not implemented for complex types #46982

Open
rjkilpatrick opened this issue Oct 28, 2020 · 0 comments · May be fixed by #47048
Open

Mean_cuda not implemented for complex types #46982

rjkilpatrick opened this issue Oct 28, 2020 · 0 comments · May be fixed by #47048

Comments

@rjkilpatrick
Copy link

@rjkilpatrick rjkilpatrick commented Oct 28, 2020

🐛 Bug

Tensor averaging not implemented for complex types

To Reproduce

>>> import torch
>>> x = torch.ones(4, dtype=torch.complex128).cuda()
>>> torch.mean(x)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-108-34af2dc3edea> in <module>
      1 import torch
      2 x = torch.ones(4, dtype=torch.complex128).cuda()
----> 3 torch.mean(x)

RuntimeError: "mean_cuda" not implemented for 'ComplexDouble'

Same for float, torch.complex64, torch.complex32.

Expected behaviour

Calculates mean across tensor, e.g.

tensor(1., device='cuda:0', dtype=torch.complex128)

Environment

PyTorch version: 1.8.0.dev20201027
Is debug build: True
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Manjaro Linux (x86_64)
GCC version: (GCC) 10.2.0
Clang version: 10.0.1
CMake version: version 3.18.3

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 970
Nvidia driver version: 450.80.02
cuDNN version: Probably one of the following:
/usr/lib/libcudnn.so.8.0.2
/usr/lib/libcudnn_adv_infer.so.8.0.2
/usr/lib/libcudnn_adv_train.so.8.0.2
/usr/lib/libcudnn_cnn_infer.so.8.0.2
/usr/lib/libcudnn_cnn_train.so.8.0.2
/usr/lib/libcudnn_ops_infer.so.8.0.2
/usr/lib/libcudnn_ops_train.so.8.0.2
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.2
[pip3] torch==1.8.0.dev20201027
[pip3] torchvision==0.9.0.dev20201027
[pip3] torchviz==0.0.1
[conda] blas 1.0 mkl
[conda] cudatoolkit 10.2.89 hfd86e86_1
[conda] mkl 2020.2 256
[conda] mkl-service 2.3.0 py38he904b0f_0
[conda] mkl_fft 1.2.0 py38h23d657b_0
[conda] mkl_random 1.1.1 py38h0573a6f_0
[conda] numpy 1.19.2 py38h54aff64_0
[conda] numpy-base 1.19.2 py38hfa32c7d_0
[conda] torch 1.8.0.dev20201026 pypi_0 pypi
[conda] torchvision 0.9.0.dev20201027 pypi_0 pypi
[conda] torchviz 0.0.1 pypi_0 pypi

cc @ezyang @anjali411 @dylanbespalko @mruberry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.