Skip to content

pixel_shuffle has inconsistent aliasing between cuda and cpu #82235

@eellison

Description

@eellison

🐛 Describe the bug

import torch

for device in ["cuda", "cpu"]:
    inp = torch.rand([1, 9, 2, 2], device=device)
    output = torch.nn.functional.pixel_shuffle(inp, upscale_factor=1)
    print(inp.storage()._cdata == output.storage()._cdata)

# True
# False

This will also cause a storage.use_count() == 1 invariant error when run in debug mode with cuda.

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are

Versions

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionablemodule: nnRelated to torch.nntriagedThis 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