Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Detection of dead ops breaks when ops return aliased storage #11

@nunoplopes

Description

@nunoplopes

Example:

x = torch.zeros([1,2])
y = torch.ones([2])

w = x.view([2])
w.add_(y)
w = None

print(x)

If we ignore that view returns a tensor whose storage is aliased with x, we would mark view & add_ as dead. But these operations are needed as they change x besides the direct impact on w.

We need a list of ops that alias storage to reenable dead op detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions