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

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

Open
nunoplopes opened this issue Oct 14, 2021 · 0 comments
Open

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

nunoplopes opened this issue Oct 14, 2021 · 0 comments

Comments

@nunoplopes
Copy link
Owner

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.

nunoplopes added a commit that referenced this issue Oct 14, 2021
The current implementation breaks with ops that return aliased storage.
See issue #11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant