-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep up-to-date with recent pytorch (#64)
Signed-off-by: youkaichao <[email protected]>
- Loading branch information
1 parent
a65f043
commit 6ca9d8c
Showing
464 changed files
with
22,734 additions
and
3,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
..._shape_with_grad/__compiled_fn_1 pre insert_deferred_runtime_asserts __compiled_fn_1 0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from __future__ import annotations | ||
|
||
|
||
|
||
def forward(self, L_a_: "f32[10]", L_b_: "f32[10]"): | ||
l_a_ = L_a_ | ||
l_b_ = L_b_ | ||
|
||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1) | ||
abs_1: "f32[10]" = torch.abs(l_a_) | ||
add: "f32[10]" = abs_1 + 1; abs_1 = None | ||
x: "f32[10]" = l_a_ / add; l_a_ = add = None | ||
|
||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0: | ||
sum_1: "f32[]" = l_b_.sum(); l_b_ = None | ||
lt: "b8[]" = sum_1 < 0; sum_1 = None | ||
return (x, lt) | ||
|
30 changes: 30 additions & 0 deletions
30
...tion_aot_eager_with_dynamic_shape_with_grad/__compiled_fn_1 tensorify_python_scalars 0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from __future__ import annotations | ||
|
||
|
||
|
||
def forward(self, primals, tangents): | ||
primals_1: "f32[10]"; primals_2: "f32[10]"; tangents_1: "f32[10]"; | ||
|
||
primals_1, primals_2, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec) | ||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1) | ||
abs_1: "f32[10]" = torch.ops.aten.abs.default(primals_1) | ||
add: "f32[10]" = torch.ops.aten.add.Tensor(abs_1, 1); abs_1 = None | ||
div: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add) | ||
|
||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:5 in toy_function, code: if b.sum() < 0: | ||
sum_1: "f32[]" = torch.ops.aten.sum.default(primals_2); primals_2 = None | ||
lt: "b8[]" = torch.ops.aten.lt.Scalar(sum_1, 0); sum_1 = None | ||
|
||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1) | ||
neg: "f32[10]" = torch.ops.aten.neg.default(tangents_1) | ||
div_1: "f32[10]" = torch.ops.aten.div.Tensor(primals_1, add) | ||
div_2: "f32[10]" = torch.ops.aten.div.Tensor(div_1, add); div_1 = None | ||
mul: "f32[10]" = torch.ops.aten.mul.Tensor(neg, div_2); neg = div_2 = None | ||
div_3: "f32[10]" = torch.ops.aten.div.Tensor(tangents_1, add); tangents_1 = add = None | ||
sgn: "f32[10]" = torch.ops.aten.sgn.default(primals_1); primals_1 = None | ||
mul_1: "f32[10]" = torch.ops.aten.mul.Tensor(mul, sgn); mul = sgn = None | ||
|
||
# File: /Users/youkaichao/data/DeepLearning/depyf/tests/test_pytorch/test_pytorch.py:4 in toy_function, code: x = a / (torch.abs(a) + 1) | ||
add_1: "f32[10]" = torch.ops.aten.add.Tensor(div_3, mul_1); div_3 = mul_1 = None | ||
return pytree.tree_unflatten([div, lt, add_1, None], self._out_spec) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...hape_with_grad/__compiled_fn_11 pre insert_deferred_runtime_asserts __compiled_fn_11 0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import annotations | ||
|
||
|
||
|
||
def forward(self, s0: "Sym(s0)", L_b_: "f32[s0]", s1: "Sym(s0)", L_x_: "f32[s0]"): | ||
l_b_ = L_b_ | ||
l_x_ = L_x_ | ||
|
||
# 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 | ||
b: "f32[s0]" = l_b_ * -1; l_b_ = None | ||
|
||
# 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 | ||
mul_1: "f32[s0]" = l_x_ * b; l_x_ = b = None | ||
return (mul_1,) | ||
|
20 changes: 20 additions & 0 deletions
20
...ion_aot_eager_with_dynamic_shape_with_grad/__compiled_fn_11 tensorify_python_scalars 0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from __future__ import annotations | ||
|
||
|
||
|
||
def forward(self, primals, tangents): | ||
primals_1: "Sym(s0)"; primals_2: "f32[s0]"; primals_3: "f32[s0]"; tangents_1: "f32[s0]"; | ||
|
||
primals_1, primals_2, primals_3, tangents_1, = fx_pytree.tree_flatten_spec([primals, tangents], self._in_spec) | ||
# 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 | ||
mul: "f32[s0]" = torch.ops.aten.mul.Tensor(primals_2, -1); primals_2 = None | ||
|
||
# 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 | ||
mul_2: "f32[s0]" = torch.ops.aten.mul.Tensor(primals_3, mul) | ||
mul_4: "f32[s0]" = torch.ops.aten.mul.Tensor(tangents_1, primals_3); primals_3 = None | ||
mul_5: "f32[s0]" = torch.ops.aten.mul.Tensor(tangents_1, mul); tangents_1 = mul = None | ||
|
||
# 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 | ||
mul_6: "f32[s0]" = torch.ops.aten.mul.Tensor(mul_4, -1); mul_4 = None | ||
return pytree.tree_unflatten([mul_2, None, mul_6, mul_5], self._out_spec) | ||
|
Oops, something went wrong.