Skip to content

Commit 71e3654

Browse files
committed
update test files
1 parent 461af54 commit 71e3654

File tree

500 files changed

+12754
-21464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

500 files changed

+12754
-21464
lines changed
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals_1: "f32[10]", tangents_1: "f32[10]"):
6-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
7-
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
8-
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
9-
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
10-
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
11-
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
12-
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
13-
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
14-
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
15-
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
16-
17-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
18-
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
19-
return (add_1, None)
20-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, primals_1: "f32[10]", tangents_1: "f32[10]"):
5+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
6+
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
7+
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
8+
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
9+
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
10+
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
11+
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
12+
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
13+
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
14+
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
15+
16+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
17+
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
18+
return (add_1, None)
19+
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, L_a_: "f32[10]", L_b_: "f32[10]"):
6-
l_a_ = L_a_
7-
l_b_ = L_b_
8-
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
10-
abs_1: "f32[10]" = torch.abs(l_a_)
11-
add: "f32[10]" = abs_1 + 1; abs_1 = None
12-
x: "f32[10]" = l_a_ / add; l_a_ = add = None
13-
14-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
15-
sum_1: "f32[]" = l_b_.sum(); l_b_ = None
16-
lt: "b8[]" = sum_1 < 0; sum_1 = None
17-
return (x, lt)
18-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, L_a_: "f32[10]", L_b_: "f32[10]"):
5+
l_a_ = L_a_
6+
l_b_ = L_b_
7+
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
9+
abs_1: "f32[10]" = torch.abs(l_a_)
10+
add: "f32[10]" = abs_1 + 1; abs_1 = None
11+
x: "f32[10]" = l_a_ / add; l_a_ = add = None
12+
13+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
14+
sum_1: "f32[]" = l_b_.sum(); l_b_ = None
15+
lt: "b8[]" = sum_1 < 0; sum_1 = None
16+
return (lt, x)
17+
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals_1: "f32[10]", primals_2: "f32[10]"):
6-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
7-
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
8-
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
9-
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add); add = None
10-
11-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
12-
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
13-
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
14-
return (div, lt, primals_1)
15-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, primals_1: "f32[10]", primals_2: "f32[10]"):
5+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
6+
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
7+
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
8+
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add); add = None
9+
10+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
11+
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
12+
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
13+
return (lt, div, primals_1)
14+
Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals, tangents):
6-
primals_1: "f32[10]"; primals_2: "f32[10]"; tangents_1: "f32[10]";
7-
8-
primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec)
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
10-
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
11-
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
12-
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
2+
import torch
3+
class joint_helper(torch.nn.Module):
4+
def forward(self, primals, tangents):
5+
primals_1: "f32[10]"; primals_2: "f32[10]"; tangents_1: "f32[10]";
136

14-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
15-
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
16-
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
17-
18-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
19-
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
20-
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
21-
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
22-
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
23-
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
24-
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
25-
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
26-
27-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
28-
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
29-
return pytree.tree_unflatten([div, lt, add_1, None], self._out_spec)
30-
7+
primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec)
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
9+
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
10+
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
11+
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
12+
13+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
14+
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
15+
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
16+
17+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
18+
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
19+
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
20+
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
21+
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
22+
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
23+
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
24+
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
25+
26+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
27+
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
28+
return pytree.tree_unflatten([lt, div, add_1, None], self._out_spec)
29+
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, L_a_: "f32[10]", L_b_: "f32[10]"):
6-
l_a_ = L_a_
7-
l_b_ = L_b_
8-
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
10-
abs_1: "f32[10]" = torch.abs(l_a_)
11-
add: "f32[10]" = abs_1 + 1; abs_1 = None
12-
x: "f32[10]" = l_a_ / add; l_a_ = add = None
13-
14-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
15-
sum_1: "f32[]" = l_b_.sum(); l_b_ = None
16-
lt: "b8[]" = sum_1 < 0; sum_1 = None
17-
return (x, lt)
18-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, L_a_: "f32[10]", L_b_: "f32[10]"):
5+
l_a_ = L_a_
6+
l_b_ = L_b_
7+
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
9+
abs_1: "f32[10]" = torch.abs(l_a_)
10+
add: "f32[10]" = abs_1 + 1; abs_1 = None
11+
x: "f32[10]" = l_a_ / add; l_a_ = add = None
12+
13+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
14+
sum_1: "f32[]" = l_b_.sum(); l_b_ = None
15+
lt: "b8[]" = sum_1 < 0; sum_1 = None
16+
return (lt, x)
17+
Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals, tangents):
6-
primals_1: "f32[10]"; primals_2: "f32[10]"; tangents_1: "f32[10]";
7-
8-
primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec)
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
10-
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
11-
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
12-
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
2+
import torch
3+
class joint_helper(torch.nn.Module):
4+
def forward(self, primals, tangents):
5+
primals_1: "f32[10]"; primals_2: "f32[10]"; tangents_1: "f32[10]";
136

14-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
15-
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
16-
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
17-
18-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
19-
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
20-
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
21-
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
22-
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
23-
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
24-
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
25-
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
26-
27-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
28-
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
29-
return pytree.tree_unflatten([div, lt, add_1, None], self._out_spec)
30-
7+
primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec)
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
9+
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1)
10+
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None
11+
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
12+
13+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0:
14+
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None
15+
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None
16+
17+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
18+
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1)
19+
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add)
20+
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None
21+
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None
22+
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None
23+
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None
24+
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None
25+
26+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1)
27+
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None
28+
return pytree.tree_unflatten([lt, div, add_1, None], self._out_spec)
29+
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals_1: "Sym(s0)", primals_2: "f32[s0]", primals_3: "f32[s0]", tangents_1: "f32[s0]"):
6-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
7-
mul_4: "f32[s0]" = torch.ops.aten.mul.Tensor(tangents_1, primals_3); primals_3 = None
8-
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
10-
mul: "f32[s0]" = torch.ops.aten.mul.Tensor(primals_2, -1); primals_2 = None
11-
12-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
13-
mul_5: "f32[s0]" = torch.ops.aten.mul.Tensor(tangents_1, mul); tangents_1 = mul = None
14-
15-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
16-
mul_6: "f32[s0]" = torch.ops.aten.mul.Tensor(mul_4, -1); mul_4 = None
17-
return (None, mul_6, mul_5)
18-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, primals_1: "Sym(s52)", primals_2: "f32[s52]", primals_3: "f32[s52]", tangents_1: "f32[s52]"):
5+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
6+
mul_4: "f32[s52]" = torch.ops.aten.mul.Tensor(tangents_1, primals_3); primals_3 = None
7+
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
9+
mul: "f32[s52]" = torch.ops.aten.mul.Tensor(primals_2, -1); primals_2 = None
10+
11+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
12+
mul_5: "f32[s52]" = torch.ops.aten.mul.Tensor(tangents_1, mul); tangents_1 = mul = None
13+
14+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
15+
mul_6: "f32[s52]" = torch.ops.aten.mul.Tensor(mul_4, -1); mul_4 = None
16+
return (None, mul_6, mul_5)
17+
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, s0: "Sym(s0)", L_b_: "f32[s0]", L_x_: "f32[s0]"):
6-
l_b_ = L_b_
7-
l_x_ = L_x_
8-
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
10-
b: "f32[s0]" = l_b_ * -1; l_b_ = None
11-
12-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
13-
mul_1: "f32[s0]" = l_x_ * b; l_x_ = b = None
14-
return (mul_1,)
15-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, s52: "Sym(s52)", L_b_: "f32[s52]", L_x_: "f32[s52]"):
5+
l_b_ = L_b_
6+
l_x_ = L_x_
7+
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
9+
b: "f32[s52]" = l_b_ * -1; l_b_ = None
10+
11+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
12+
mul_1: "f32[s52]" = l_x_ * b; l_x_ = b = None
13+
return (mul_1,)
14+
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from __future__ import annotations
2-
3-
4-
5-
def forward(self, primals_1: "Sym(s0)", primals_2: "f32[s0]", primals_3: "f32[s0]"):
6-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
7-
mul: "f32[s0]" = torch.ops.aten.mul.Tensor(primals_2, -1)
8-
9-
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
10-
mul_2: "f32[s0]" = torch.ops.aten.mul.Tensor(primals_3, mul); mul = None
11-
return (mul_2, primals_2, primals_3, primals_1)
12-
2+
import torch
3+
class GraphModule(torch.nn.Module):
4+
def forward(self, primals_1: "Sym(s52)", primals_2: "f32[s52]", primals_3: "f32[s52]"):
5+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:6 in torch_dynamo_resume_in_toy_function_at_5, code: b = b * -1
6+
mul: "f32[s52]" = torch.ops.aten.mul.Tensor(primals_2, -1)
7+
8+
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:7 in torch_dynamo_resume_in_toy_function_at_5, code: return x * b
9+
mul_2: "f32[s52]" = torch.ops.aten.mul.Tensor(primals_3, mul); mul = None
10+
return (mul_2, primals_2, primals_3, primals_1)
11+

0 commit comments

Comments
 (0)