-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Rename torch::autograd::Function to torch::autograd::Node #23269
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
Conversation
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Stack from [ghstack](https://github.com/ezyang/ghstack): * **#23269 Rename torch::autograd::Function to torch::autograd::Node** Summary: We will be adding an API for custom autograd functions in C++ (#23020) and we would like to expose it as `torch::autograd::Function` (which is different from the current `torch::autograd::Function`) to match the Python API. So, I plan to rename the current `torch::autograd::Function` to `torch::autograd::Node` and `torch::autograd::PyFunction` to `torch::autograd::PyNode`. Planned updates to this stack: 1. Rename `PyFunction` to `PyNode` 2. Rename `FunctionTask`, and `deleteFunction` to `NodeTask`, `deleteNode` for consistency.
This pull request has been merged in e7a9b0d. |
@ezyang FYI the PR summary didn't end up in the commit. Perhaps some race. But the summary here is very valuable for anyone casually reading the code and figuring out what motivated this change. |
I let the open source team know about that; I see that the diff has the correct description and so ShipIt ought to have preserved it. |
Is there any reason we didn't rename "function.h" and "function.cpp" to "node.h" and "node.cpp"? It will certainly make folks reading the code in the future a bit easier. |
Laziness, probably :) |
Stack from ghstack:
Summary:
We will be adding an API for custom autograd functions in C++ (#23020) and we would like to expose it as
torch::autograd::Function
(which is different from the currenttorch::autograd::Function
) to match the Python API. So, I plan to rename the currenttorch::autograd::Function
totorch::autograd::Node
andtorch::autograd::PyFunction
totorch::autograd::PyNode
.FunctionTask
, anddeleteFunction
renamed toNodeTask
,deleteNode
for consistency.Differential Revision: D16454878