AliasDB interface cleanup (#15656)
authorMichael Suo <suo@fb.com>
Sat, 12 Jan 2019 04:04:14 +0000 (20:04 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 12 Jan 2019 04:06:53 +0000 (20:06 -0800)
commit83c054de481d4f65a8a73a903edd6beaac18e8bc
treeaca867b0f5a0c9d72044e6f90f830abf9cbb18b7
parent00b2dff6b6ac25c5776bbfc1523b65a0e56ba7cc
AliasDB interface cleanup (#15656)

Summary:
This is the first of several PRs to simplify AliasDb usage.
- Hide the concept wildcards from users. They are too hard to think about and too easy to forget about.
- Start moving "mutability-safe" graph mutation methods into AliasDb (right now, the various methods that deal with topological move).

Eventually I want to create a "mutability-aware" handle to the graph. If you only use that handle to transform the graph, you can be sure that all transformations are safe with respect to mutability.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15656

Differential Revision: D13615492

Pulled By: suo

fbshipit-source-id: 5c39a157b4ea76f1f976315d06a314a89cc4f22f
12 files changed:
test/cpp/jit/tests.h
torch/csrc/jit/ir.cpp
torch/csrc/jit/ir.h
torch/csrc/jit/passes/alias_analysis.cpp
torch/csrc/jit/passes/alias_analysis.h
torch/csrc/jit/passes/batch_mm.cpp
torch/csrc/jit/passes/common_subexpression_elimination.cpp
torch/csrc/jit/passes/constant_propagation.cpp
torch/csrc/jit/passes/create_autodiff_subgraphs.cpp
torch/csrc/jit/passes/dead_code_elimination.cpp
torch/csrc/jit/passes/graph_fuser.cpp
torch/csrc/jit/passes/shape_analysis.cpp