Skip to content

Commit

Permalink
multiple inplace
Browse files Browse the repository at this point in the history
Co-authored-by: nikitaved <nikitaved@users.noreply.github.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
  • Loading branch information
crcrpar and nikitaved committed Jul 19, 2024
1 parent fd1d918 commit 4777056
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion thunder/tests/test_inplace_functionalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,12 @@ def f(a, b):
def test_no_self_repeat_in_subsymbols(executor, device, _):

def f(a, b, c):
a.add_(b, alpha=c)
return a.add_(b, alpha=c)

def functional_f(a, b, c):
return a.add(b, alpha=c)
d = a.add(b, alpha=c)
return d.add(b, alpha=c)

a = make_tensor((2, 2), device=device, dtype=torch.float32)
b = make_tensor((2, 2), device=device, dtype=torch.float32)
Expand Down

0 comments on commit 4777056

Please sign in to comment.