Skip to content

Conversation

malvika2147
Copy link

@malvika2147 malvika2147 commented Jul 23, 2019

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 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. FunctionTask, and deleteFunction renamed to NodeTask, deleteNode for consistency.

Differential Revision: D16454878

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@pytorchbot pytorchbot added module: autograd Related to torch.autograd, and the autograd engine in general module: cpp Related to C++ API module: docs Related to our documentation, both in docs/ and docblocks module: internals Related to internal abstractions in c10 and ATen module: pybind Related to our Python bindings / interactions with other Python libraries labels Jul 23, 2019
malvika2147 pushed a commit that referenced this pull request Jul 23, 2019
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 3af8edd
Pull Request resolved: #23269
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 23, 2019
@malvika2147 malvika2147 changed the title Rename torch::autograd::Function to torch::autograd::Node [WIP] Rename torch::autograd::Function to torch::autograd::Node Jul 23, 2019
@malvika2147 malvika2147 requested a review from ezyang July 23, 2019 21:40
@malvika2147 malvika2147 changed the title [WIP] Rename torch::autograd::Function to torch::autograd::Node Rename torch::autograd::Function to torch::autograd::Node Jul 23, 2019
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.
malvika2147 pushed a commit that referenced this pull request Jul 23, 2019
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 7f647c4
Pull Request resolved: #23269
@zou3519 zou3519 deleted the gh/mal2147/16/head branch July 24, 2019 03:54
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in e7a9b0d.

@pietern
Copy link
Contributor

pietern commented Jul 24, 2019

@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.

@ezyang
Copy link
Contributor

ezyang commented Jul 24, 2019

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.

@gqchen
Copy link
Member

gqchen commented Feb 24, 2020

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.

@ezyang
Copy link
Contributor

ezyang commented Feb 25, 2020

Laziness, probably :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: autograd Related to torch.autograd, and the autograd engine in general module: cpp Related to C++ API module: docs Related to our documentation, both in docs/ and docblocks module: internals Related to internal abstractions in c10 and ATen module: pybind Related to our Python bindings / interactions with other Python libraries oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants