mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54809 I'm going to post on dev-discuss soon with a more thorough explanation of the design and advantages of this shape analysis, so I'm leaving out that for now. There is still a ton left to do, I'm posting this initial version so we can get something on master multiple can work on. List of many remaining steps to do: - [ ] Add symbolic shapes support - [ ] Bind shape functions for operators in C++ - [ ] Make classes of operators share the same shape function (e.g. pointwise, broadcast two inputs) - [ ] Refactor APIs - [ ] Only iteratively optimize shape function while a change has been made - [ ] Expand coverage of coverage to common ops - [ ] Add shape analysis pass on Graph that handles Ifs and Loops - [ ] Allow concurrent reads to the operator map - [ ] Successive applications of same inputs to same shape function (e.g. series of pointwise ops) For this review, I am mostly looking for comments related to the implementation of symolic_shape_analysis.cpp, with the caveats listed above. I am not really looking for comments related to api/registration/graph level analysis as those are all planned to be changed. I am fine landing this as is or waiting until necessary components of the TODOs above are finished. Test Plan: Imported from OSS Reviewed By: pbelevich Differential Revision: D27750998 Pulled By: eellison fbshipit-source-id: 4338b99e8651df076291c6b781c0e36a1bcbec03 |
||
|---|---|---|
| .. | ||
| init.cpp | ||
| init.h | ||
| module_python.h | ||
| pybind_utils.cpp | ||
| pybind_utils.h | ||
| pybind.h | ||
| python_arg_flatten.cpp | ||
| python_arg_flatten.h | ||
| python_custom_class.cpp | ||
| python_custom_class.h | ||
| python_interpreter.cpp | ||
| python_ir.cpp | ||
| python_ir.h | ||
| python_ivalue.h | ||
| python_sugared_value.cpp | ||
| python_sugared_value.h | ||
| python_tracer.cpp | ||
| python_tracer.h | ||
| python_tree_views.cpp | ||
| python_tree_views.h | ||
| script_init.cpp | ||
| script_init.h | ||
| update_graph_executor_opt.cpp | ||
| update_graph_executor_opt.h | ||