Skip to content

[jit] serialize autograd ops into its own namespace#26761

Closed
wanchaol wants to merge 3 commits intogh/wanchaol/53/basefrom
gh/wanchaol/53/head
Closed

[jit] serialize autograd ops into its own namespace#26761
wanchaol wants to merge 3 commits intogh/wanchaol/53/basefrom
gh/wanchaol/53/head

Conversation

@wanchaol
Copy link
Collaborator

@wanchaol wanchaol commented Sep 24, 2019

Stack from ghstack:

Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into torch.autograd.op, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D17645438

Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@wanchaol wanchaol requested a review from apaszke as a code owner September 24, 2019 22:20
@pytorchbot pytorchbot added oncall: jit Add this issue/PR to JIT oncall triage queue module: internals Related to internal abstractions in c10 and ATen module: pybind Related to our Python bindings / interactions with other Python libraries labels Sep 24, 2019
wanchaol added a commit that referenced this pull request Sep 24, 2019
Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 5ee881f
Pull Request resolved: #26761
@wanchaol wanchaol requested a review from zdevito September 24, 2019 22:21
}

void printOpName(TaggedStringStream& stmt, Symbol kind) {
const static std::unordered_set<Symbol> autograd_ns_symbols = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels overly specific to autograd, it can just be a map from symbol to an override for how it is serialized:

{aten::backward, "torch.autograd.backward"},

…ace"

Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
wanchaol added a commit that referenced this pull request Sep 25, 2019
Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 5b25074
Pull Request resolved: #26761
Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
wanchaol added a commit that referenced this pull request Sep 27, 2019
Summary:
This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 07322ed
Pull Request resolved: #26761
@wanchaol wanchaol requested a review from zdevito September 27, 2019 01:33
@wanchaol wanchaol added this to the 1.3 milestone Sep 27, 2019
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 30, 2019
Summary:
Pull Request resolved: pytorch/pytorch#26761

This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan: Imported from OSS

Differential Revision: D17645438

fbshipit-source-id: 656ec6b31d4fc2252585de73117c4d40a122678e
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a252aee.

@facebook-github-bot facebook-github-bot deleted the gh/wanchaol/53/head branch October 28, 2019 22:21
pdlive215 pushed a commit to pdlive215/pytorch that referenced this pull request Nov 27, 2019
Summary:
Pull Request resolved: pytorch#26761

This PR serialize autograd ops into its own namespace by turning the
serialization op name into `torch.autograd.op`, this is to keep the
original code namespace rather than turning all to the global namespace,
this will be more properly handled in the future when we handle the module
namespace. This change also preserve BC until we have namespace handling

Test Plan: Imported from OSS

Differential Revision: D17645438

fbshipit-source-id: 656ec6b31d4fc2252585de73117c4d40a122678e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

5 participants