lightning-thunder icon indicating copy to clipboard operation
lightning-thunder copied to clipboard

multiple in-place ops to func's arg tensors that are a view of another

Open crcrpar opened this issue 1 year ago • 1 comments

          Looks good to me, I wonder if we want a note about aliases as args?
def f(a, b):
    return a.exp_().sin_() + b.exp_().sin_()

a = torch.randn(5, 5)
f(a, a)

Originally posted by @t-vi in https://github.com/Lightning-AI/lightning-thunder/pull/723#pullrequestreview-2165267499

rel: #657

cc @apaz-cli

crcrpar avatar Jul 09 '24 17:07 crcrpar