8000 [pytree] Add public pytree module `torch.utils.pytree` by XuehaiPan · Pull Request #137400 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[pytree] Add public pytree module torch.utils.pytree #137400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8000
Open
wants to merge 158 commits into
base: gh/XuehaiPan/179/base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
b69d677
Update
XuehaiPan Oct 5, 2024
b864295
Update
XuehaiPan Oct 5, 2024
bdb2723
Update
XuehaiPan Oct 5, 2024
9b21fd9
Update
XuehaiPan Oct 5, 2024
f1f9fe1
Update
XuehaiPan Oct 5, 2024
d98b761
Update
XuehaiPan Oct 5, 2024
4ae51d3
Update
XuehaiPan Oct 5, 2024
afe4cbc
Update
XuehaiPan Oct 5, 2024
8faa309
Update
XuehaiPan Oct 6, 2024
62bd418
Update
XuehaiPan Oct 6, 2024
75cf169
Update
XuehaiPan Oct 6, 2024
1c55add
Update
XuehaiPan Oct 6, 2024
4e889a3
Update
XuehaiPan Oct 6, 2024
456e43f
Update
XuehaiPan Oct 6, 2024
3301607
Update
XuehaiPan Oct 6, 2024
973f823
Update
XuehaiPan Oct 6, 2024
f9603a1
Update
XuehaiPan Oct 6, 2024
ab67952
Update
XuehaiPan Oct 6, 2024
19dc944
Update
XuehaiPan Oct 6, 2024
0ee2c92
Update
XuehaiPan Oct 7, 2024
368e727
Update
XuehaiPan Oct 7, 2024
6262031
Update
XuehaiPan Oct 13, 2024
2009f30
Update
XuehaiPan Oct 13, 2024
442d540
Update
XuehaiPan Oct 13, 2024
817f3e7
Update
XuehaiPan Oct 13, 2024
09e0f52
Update
XuehaiPan Oct 13, 2024
3260ab7
Update
XuehaiPan Oct 13, 2024
e5ee365
Update
XuehaiPan Oct 14, 2024
2c4092e
Update
XuehaiPan Oct 14, 2024
99ecfb0
Update
XuehaiPan Oct 14, 2024
9920717
Update
XuehaiPan Oct 14, 2024
71d3b3b
Update
XuehaiPan Oct 16, 2024
8b12a94
Update
XuehaiPan Oct 16, 2024
cecb2f8
Update
XuehaiPan Oct 16, 2024
c19ca53
Update
XuehaiPan Oct 16, 2024
134d27c
Update
XuehaiPan Oct 16, 2024
81b174c
Update
XuehaiPan Oct 16, 2024
2ddea8a
Update
XuehaiPan Oct 16, 2024
fcdaf19
Update
XuehaiPan Oct 16, 2024
5f3730f
Update
XuehaiPan Oct 16, 2024
5caefe3
Update
XuehaiPan Oct 16, 2024
aea9c80
Update
XuehaiPan Oct 16, 2024
263a0ac
Update
XuehaiPan Oct 16, 2024
b97ff03
Update
XuehaiPan Oct 17, 2024
1ad1ae6
Update
XuehaiPan Oct 17, 2024
051141b
Update
XuehaiPan Oct 17, 2024
0bf16a5
Update
XuehaiPan Oct 25, 2024
a67ffdf
Update
XuehaiPan Oct 26, 2024
29f0d14
Update
XuehaiPan Oct 29, 2024
3ee9bf7
Update
XuehaiPan Oct 29, 2024
16e7ce5
Update
XuehaiPan Oct 29, 2024
a976bb7
Update
XuehaiPan Oct 29, 2024
75fcd31
Update
XuehaiPan Oct 29, 2024
a7ba175
Update
XuehaiPan Oct 29, 2024
41f79bf
Update
XuehaiPan Oct 29, 2024
6972568
Update
XuehaiPan Oct 30, 2024
0783f49
Update
XuehaiPan Oct 30, 2024
e1077e3
Update
XuehaiPan Nov 5, 2024
abbfd64
Update
XuehaiPan Nov 11, 2024
0e0d171
Update
XuehaiPan Nov 17, 2024
04490d5
Update
XuehaiPan Nov 20, 2024
7df9f45
Update
XuehaiPan Nov 20, 2024
4040780
Update
XuehaiPan Nov 20, 2024
59c9eb5
Update
XuehaiPan Nov 20, 2024
1e5c70d
Update
XuehaiPan Nov 20, 2024
8f83ebe
Update
XuehaiPan Nov 20, 2024
7f99a04
Update
XuehaiPan Nov 20, 2024
da88b35
Update
XuehaiPan Nov 21, 2024
7ffad9b
Update
XuehaiPan Nov 21, 2024
7c8e846
Update
XuehaiPan Nov 21, 2024
f4e8534
Update
XuehaiPan Nov 21, 2024
7a8cdb8
Update
XuehaiPan Nov 22, 2024
0efaf64
Update
XuehaiPan Nov 22, 2024
a95d0d0
Update
XuehaiPan Nov 26, 2024
b51f674
Update
XuehaiPan Nov 26, 2024
7595631
Update
XuehaiPan Nov 27, 2024
dbe2b61
Update
XuehaiPan Dec 2, 2024
da11332
Update
XuehaiPan Dec 2, 2024
9daa07c
Update
XuehaiPan Dec 7, 2024
f1ad58b
Update
XuehaiPan Dec 9, 2024
601fd57
Update
XuehaiPan Dec 13, 2024
766339d
Update
XuehaiPan Dec 13, 2024
29fba05
Update
XuehaiPan Dec 25, 2024
5f5c7b4
Update
XuehaiPan Dec 25, 2024
3f353ca
Update
XuehaiPan Dec 25, 2024
7ece048
Update
XuehaiPan Jan 7, 2025
2f912e0
Update
XuehaiPan Jan 8, 2025
23256b3
Update
XuehaiPan Jan 8, 2025
928ebf5
Update
XuehaiPan Jan 8, 2025
40ad21a
Update
XuehaiPan Jan 9, 2025
2f231de
Update
XuehaiPan Jan 9, 2025
2c25cc7
Update
XuehaiPan Jan 9, 2025
f4b033f
Update
XuehaiPan Jan 10, 2025
97e6470
Update
XuehaiPan Jan 10, 2025
f9c8615
Update
XuehaiPan Feb 4, 2025
b061f4e
Update
XuehaiPan Feb 9, 2025
f3e9391
Update
XuehaiPan Feb 9, 2025
267d766
Update
XuehaiPan Feb 16, 2025
d686ab3
Update
XuehaiPan Feb 17, 2025
a380b16
Update
XuehaiPan Feb 28, 2025
884b510
Update
XuehaiPan Feb 28, 2025
76de369
Update
XuehaiPan Feb 28, 2025
ffc158c
Update
XuehaiPan Feb 28, 2025
13d10c6
Update
XuehaiPan Feb 28, 2025
0a505ca
Update
XuehaiPan Feb 28, 2025
b71fafd
Update
XuehaiPan Feb 28, 2025
21dfc97
Update
XuehaiPan Feb 28, 2025
1609c4d
Update
XuehaiPan Feb 28, 2025
fadd417
Update
XuehaiPan Mar 1, 2025
4d0c4e6
Update
XuehaiPan Mar 1, 2025
e0fe4fe
Update
XuehaiPan Mar 3, 2025
3ea6e94
Update
XuehaiPan Mar 3, 2025
ce179d1
Update
XuehaiPan Mar 3, 2025
5a6aec8
Update
XuehaiPan Mar 3, 2025
311a537
Update
XuehaiPan Mar 4, 2025
14a46ed
Update
XuehaiPan Mar 4, 2025
7ebca96
Update
XuehaiPan Mar 4, 2025
9e093f9
Update
XuehaiPan Mar 4, 2025
17ec427
Update
XuehaiPan Mar 4, 2025
019f8ed
Update
XuehaiPan Mar 5, 2025
4b5925b
Update
XuehaiPan Mar 5, 2025
501add1
Update
XuehaiPan Mar 5, 2025
2c22765
Update
XuehaiPan Mar 6, 2025
bbe07eb
Update
XuehaiPan Mar 6, 2025
0fc2587
Update
XuehaiPan Mar 6, 2025
a9d4c2d
Update
XuehaiPan Mar 7, 2025
b797ea9
Update
XuehaiPan Mar 12, 2025
dae2fd7
Update
XuehaiPan Mar 14, 2025
70a0491
Update
XuehaiPan Mar 20, 2025
760acdc
Update
XuehaiPan Apr 1, 2025
1d1a757
Update
XuehaiPan Apr 3, 2025
8673d98
Update
XuehaiPan Apr 3, 2025
40df9f6
Update
XuehaiPan Apr 3, 2025
c0a2be6
Update
XuehaiPan Apr 5, 2025
e9d6c69
Update
XuehaiPan Apr 7, 2025
ee326e8
Update
XuehaiPan Apr 10, 2025
391ac27
Update
XuehaiPan Apr 11, 2025
197d5b4
Update
XuehaiPan Apr 11, 2025
2e3b261
Update
XuehaiPan Apr 11, 2025
a5c5404
Update
XuehaiPan Apr 11, 2025
183358a
Update
XuehaiPan Apr 15, 2025
e5b6f63
Update
XuehaiPan Apr 15, 2025
69f80f4
Update
XuehaiPan Apr 15, 2025
f61beeb
Update
XuehaiPan Apr 15, 2025
22947d7
Update
XuehaiPan Apr 23, 2025
5515da3
Update
XuehaiPan Apr 26, 2025
f72b55e
Update
XuehaiPan May 1, 2025
c91f575
Update
XuehaiPan May 1, 2025
7e0f546
Update
XuehaiPan May 1, 2025
abae549
Update
XuehaiPan May 1, 2025
2fc047b
Update
XuehaiPan May 2, 2025
e635263
Update
XuehaiPan May 2, 2025
9efa19c
Update
XuehaiPan May 2, 2025
81e6b01
Update
XuehaiPan May 2, 2025
d665e57
Update
XuehaiPan May 3, 2025
4b154fa
Update
XuehaiPan May 8, 2025
a2bb393
Update
XuehaiPan May 14, 2025
087c7b2
Update
XuehaiPan May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ include_patterns = [
'benchmarks/instruction_counts/**/*.py',
'tools/**/*.py',
'torchgen/**/*.py',
'torch/utils/pytree/__init__.py',
'torch/utils/_pytree.py',
'torch/utils/_cxx_pytree.py',
'torch/utils/benchmark/utils/common.py',
Expand Down
1 change: 1 addition & 0 deletions docs/source/pytorch-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ sparse
storage
torch.testing <testing>
torch.utils <utils>
torch.utils.pytree
torch.utils.benchmark <benchmark_utils>
torch.utils.bottleneck <bottleneck>
torch.utils.checkpoint <checkpoint>
Expand Down
7 changes: 7 additions & 0 deletions docs/source/torch.utils.pytree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
torch.utils.pytree
==================

.. currentmodule:: torch.utils.pytree

.. automodule:: torch.utils.pytree
:members:
1 change: 1 addition & 0 deletions mypy-strict.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ files =
benchmarks/instruction_counts,
tools,
torch/profiler/_memory_profiler.py,
torch/utils/pytree/__init__.py,
torch/utils/_pytree.py,
torch/utils/_cxx_pytree.py,
torch/utils/benchmark/utils/common.py,
Expand Down
4 changes: 2 additions & 2 deletions test/dynamo/test_flat_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def forward(self, L_x_: "f32[10]", L_y_: "f32[10]"):

t: "f32[10]" = l_x_ + l_y_

trace_point_tensor_spec : torch.utils._pytree.TreeSpec = self.trace_point_tensor_spec
trace_point_tensor_input_spec : torch.utils._pytree.TreeSpec = self.trace_point_tensor_input_spec
trace_point_tensor_spec : torch.utils.pytree.PyTreeSpec = self.trace_point_tensor_spec
trace_point_tensor_input_spec : torch.utils.pytree.PyTreeSpec = self.trace_point_tensor_input_spec
res: "f32[10]" = torch.ops.higher_order.flat_apply(trace_point_tensor_spec, trace_point_tensor_input_spec, l_x_, l_y_, t); trace_point_tensor_spec = trace_point_tensor_input_spec = l_x_ = l_y_ = t = None
return (res,)
""", # NOQA: B950
Expand Down
Loading
Loading
0