Skip to content

GPU tensor sum changes after transpose #4914

Closed
@myleott

Description

@myleott

This happens intermittently with CUDA tensors, but never with CPU tensors:

>>> x = torch.rand(3, 4, 5).cuda()
>>> x.sum()
26.833271026611328
>>> x.transpose(0, 1).sum()
26.83327293395996

This happens both on a recent version of PyTorch (0.4.0a0+4970e73) and 0.3.0.

Is this expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions