-
Notifications
You must be signed in to change notification settings - Fork 24.5k
[nativert] Move Pytree #155136
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
[nativert] Move Pytree #155136
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155136
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 5a299f0 with merge base 1dd0b1d ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D75965059 |
I'm sure @XuehaiPan has some thoughts here |
I think we mean to move the code to nativert/ as part of the impl details. To add some context, we don't intend to expose this as part of public API. Also this pytree impl contains many optimizations we accumulated to high qps low latency model serving use cases and imo we should still recommend ppl to use optree in common cases. |
This pull request was exported from Phabricator. Differential Revision: D75965059 |
0f82827
to
05666b3
Compare
Summary: Pull Request resolved: pytorch#155136 fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:pytree_test ``` OSS CI Rollback Plan: Differential Revision: D75965059
@zhxchen17 sure, I'll move it to |
This pull request was exported from Phabricator. Differential Revision: D75965059 |
05666b3
to
08244e4
Compare
Summary: Pull Request resolved: pytorch#155136 fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:pytree_test ``` OSS CI Differential Revision: D75965059
This pull request was exported from Phabricator. Differential Revision: D75965059 |
08244e4
to
601cb83
Compare
Summary: Pull Request resolved: #155136 fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:pytree_test ``` OSS CI Differential Revision: D75965059
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zou3519 how does that align with the other c++ pytree discussion we've been having?
@albanD when we say C++ pytree we really mean two things:
"C++ Pytree" and optree is (1). We don't have (2) in PyTorch. This PR adds (2). My conclusion is that we should allow this PR and that it is unrelated to the optree story. If we're up to it then we should probably name it something else other than "pytree", because there's no Python involved |
I'd argue it's not completely unrelated to python, because it does register and process the string representation of python types in json, e.g. But if we really want a name other than pytree, @zou3519 @zhxchen17 do you have any suggestion for a better name? maybe |
@XuehaiPan @zou3519 How about we just re-use the |
…cture (#155136) Summary: Pull Request resolved: #155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: #155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `NestedSpec` 2. `treeSpecLoads` -> `nestedSpecLoads` 3. `treeFlatten` -> `nestedFlatten` 4. `treeUnflatten` -> `nestedUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zhxchen17 Differential Revision: D75965059
This pull request was exported from Phabricator. Differential Revision: D75965059 |
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `NestedSpec` 2. `treeSpecLoads` -> `nestedSpecLoads` 3. `treeFlatten` -> `nestedFlatten` 4. `treeUnflatten` -> `nestedUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zhxchen17 Differential Revision: D75965059
75d382e
to
1522644
Compare
@zou3519 updated to use |
This pull request was exported from Phabricator. Differential Revision: D75965059 |
1522644
to
9767a8b
Compare
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `NestedSpec` 2. `treeSpecLoads` -> `nestedSpecLoads` 3. `treeFlatten` -> `nestedFlatten` 4. `treeUnflatten` -> `nestedUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zou3519, zhxchen17 Differential Revision: D75965059
This pull request was exported from Phabricator. Differential Revision: D75965059 |
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `NestedSpec` 2. `treeSpecLoads` -> `nestedSpecLoads` 3. `treeFlatten` -> `nestedFlatten` 4. `treeUnflatten` -> `nestedUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zou3519, zhxchen17 Differential Revision: D75965059
9767a8b
to
93e11c0
Compare
This pull request was exported from Phabricator. Differential Revision: D75965059 |
93e11c0
to
f06e5e8
Compare
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `ITreeSpec` 2. `treeSpecLoads` -> `itreeSpecLoads` 3. `treeFlatten` -> `itreeFlatten` 4. `treeUnflatten` -> `itreeUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zou3519, zhxchen17 Differential Revision: D75965059
This pull request was exported from Phabricator. Differential Revision: D75965059 |
f06e5e8
to
bec2859
Compare
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `ITreeSpec` 2. `treeSpecLoads` -> `itreeSpecLoads` 3. `treeFlatten` -> `itreeFlatten` 4. `treeUnflatten` -> `itreeUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zou3519, zhxchen17 Differential Revision: D75965059
…orch#155136) Summary: Pull Request resolved: pytorch#155136 Torch Native Runtime RFC: pytorch/rfcs#72 As part of the effort to open source TorchNativeRuntime (or what we call Sigmoid), we are moving the Pytree implementation to torch/: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common We also renamed the functions, the reason behind renaming is in this discussion: pytorch#155136 The functionalities and implementation remain the same. Rename the class and functions: 1. `TreeSpec` -> `ITreeSpec` 2. `treeSpecLoads` -> `itreeSpecLoads` 3. `treeFlatten` -> `itreeFlatten` 4. `treeUnflatten` -> `itreeUnflatten` 5. `leafApply` -> `ivalueApply` 6. `leafApplyFromArgs` -> `ivalueApplyFromArgs` Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:itree_test ``` OSS CI Reviewed By: zou3519, zhxchen17 Differential Revision: D75965059
This pull request was exported from Phabricator. Differential Revision: D75965059 |
bec2859
to
5a299f0
Compare
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common Torch Native Runtime RFC: pytorch/rfcs#72 Test Plan: ``` buck run fbcode//mode/dev-nosan //caffe2/test/cpp/nativert:pytree_test ``` OSS CI Rollback Plan: Differential Revision: D75965059 Pull Request resolved: pytorch#155136 Approved by: https://github.com/zhxchen17, https://github.com/XuehaiPan, https://github.com/zou3519
Summary: fbcode/sigmoid/core/common -> fbcode/caffe2/torch/nativert/common
Torch Native Runtime RFC: pytorch/rfcs#72
Test Plan:
OSS CI
Rollback Plan:
Differential Revision: D75965059