pytorch/torch/csrc/jit/python
Elias Ellison 9cbeb0faed [JIT] Dont optimize shape peepholes on inline (#36404)
Summary:
With https://github.com/pytorch/pytorch/pull/35562, we are running peephole optimization on inlining to reduce the number of nodes that are copied.

The tracer encodes the sizes in the graph like:
```
graph(%0 : Double(7)):
  %1 : Function = prim::Constant[name="tensor_size"]()
  %2 : Tensor = prim::CallFunction(%1, %0)
  return (%2)
```

however people would like to reuse the graph with different shapes so running size invalidations would invalidate that. long term it might be better for the tracer to not include shape information but there are downstream users of that.

Separates out FuseAddMM from peephole so that now there is a single `disable_size_optimizations` parameter, and onnx explicitly invokes fuseaddmm.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36404

Differential Revision: D20968974

Pulled By: eellison

fbshipit-source-id: 56f8f1699e3b0adeeccdfd5a67bb975fd41a2913
2020-04-15 17:49:48 -07:00
..
init.cpp [JIT] Dont optimize shape peepholes on inline (#36404) 2020-04-15 17:49:48 -07:00
init.h
module_python.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
pybind_utils.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
pybind.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_arg_flatten.cpp [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_arg_flatten.h
python_custom_class.cpp [reapply][JIT] Namespaces for TorchBind (#35254) 2020-03-24 00:39:48 -07:00
python_custom_class.h
python_interpreter.cpp [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_ir.cpp Revert D20783298: Fix naming of "strides" method in TensorType 2020-04-09 04:24:43 -07:00
python_ir.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_ivalue.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_sugared_value.cpp [jit] Fix named tuple resolution (#35409) 2020-03-27 17:07:26 -07:00
python_sugared_value.h [jit] Fix named tuple resolution (#35409) 2020-03-27 17:07:26 -07:00
python_tracer.cpp [jit] tracer flag to guard risky behaivors (#36277) 2020-04-13 22:35:03 -07:00
python_tracer.h [jit] tracer flag to guard risky behaivors (#36277) 2020-04-13 22:35:03 -07:00
python_tree_views.cpp [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_tree_views.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
script_init.cpp [jit] tracer flag to guard risky behaivors (#36277) 2020-04-13 22:35:03 -07:00
script_init.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
update_graph_executor_opt.cpp [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
update_graph_executor_opt.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00