Skip to content

Many APIs INTERNAL ASSERT FAILED when promoting complex32 dtype #71671

@ilovepytorch

Description

@ilovepytorch

🐛 Describe the bug

I create a new issue to log the APIs that trigger INTERNAL ASSERT FAILED when promoting complex32 dtype based on my reply.

Buggy APIs:

torch.ge
torch.le
torch.gt
torch.lt
torch.ne
torch.eq
torch.igamma
torch.igammac
torch.xlogy
torch.logical_and
torch.logical_or
torch.logical_xor
torch.bitwise_and
torch.bitwise_or
torch.bitwise_xor
torch.bucketize
torch.searchsorted
torch.dist
torch.ldexp
torch.sub
torch.add
torch.mul
torch.div
torch.ger
torch.outer
torch.inner
torch.nextafter
torch.copysign
torch.pow
torch.gcd
torch.lcm
torch.remainder
torch.logaddexp
torch.logaddexp2
torch.bitwise_right_shift
torch.bitwise_left_shift
torch.nn.functional.l1_loss
torch.nn.functional.mse_loss
torch.nextafter
torch.fmod
torch.atan2
torch.renorm

A code snippet to reproduce:

import torch
results = dict()
input = torch.rand([1], dtype=torch.float64)
other = torch.rand([1], dtype=torch.complex32)
try:
  results["res"] = torch.add(input, other)
except Exception as e:
  results["err"] = "ERROR:"+str(e)
print(results)

Versions

pytorch: 1.10.1

cc @ezyang @gchanan @zou3519 @bdhirsh @anjali411 @dylanbespalko @mruberry @lezcano @nikitaved

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: complexRelated to complex number support in PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions