Skip to content

[primTorch] Strides for complex abs are incorrect #77526

@mruberry

Description

@mruberry
a = torch.randn((2, 2)).transpose(0, 1)
a.stride()
: (1, 2)

result = torch.abs(a)
result.stride()
: (1, 2)

b = torch.randn((2, 2), dtype=torch.cfloat).transpose(0, 1)
b.stride()
: (1, 2)

result = torch.abs(b)
result.stride()
: (2, 1)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: complexRelated to complex number support in PyTorchmodule: primTorchmodule: type promotionRelated to semantics of type promotiontriagedThis 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