pytorch/torch/csrc/jit/python
Elias Ellison 6694fdaccd Clean up profiling mode and profiling executor strategy (#73875)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73875

Previously we had a few settings:
- getExecutor - which toggled between Profiling Executor and Legacy
- getGraphOptimize - if true, overrides PE/Legacy to run with simple executor (no optimizations)
and then...
- getProfilingMode - which would set PE to 0 specializtions.

The last mode is redundant with getGraphOptimize, we should just remove it and use getGraphOptimize in these cases. It would lead to potentially invalid combinations of logic - what does mean if getProfilingMode is true but getExecutor is set to false ? This would lead to a bug in specialize_autograd_zero in this case, see: https://github.com/pytorch/pytorch/blob/master/torch%2Fcsrc%2Fjit%2Fpasses%2Fspecialize_autogradzero.cpp#L93.

The tests here are failing but get fixed with the PR above it, so i'll squash for landing.

Test Plan: Imported from OSS

Reviewed By: cpuhrsch

Differential Revision: D34938130

Pulled By: eellison

fbshipit-source-id: 1a9c0ae7f6d1cfddc2ed3499a5af611053ae5e1b
(cherry picked from commit cf69ce3d155ba7d334022c42fb2cee54bb088c23)
2022-03-29 18:38:51 +00:00
..
init.cpp Fix issue with prim::Print() and torch::deploy (#74513) 2022-03-25 03:14:34 +00:00
init.h
module_python.h
pybind_utils.cpp Get rid of TorchScript sparse tensor is experimental warning. (#73874) 2022-03-09 15:45:24 +00:00
pybind_utils.h Get rid of TorchScript sparse tensor is experimental warning. (#73874) 2022-03-09 15:45:24 +00:00
pybind.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2021-12-19 16:38:25 -08:00
python_arg_flatten.cpp
python_arg_flatten.h
python_custom_class.cpp
python_custom_class.h
python_dict.cpp
python_dict.h
python_interpreter.cpp
python_ir.cpp [ONNX] ONNX Exporter logging (#71342) 2022-03-17 19:40:03 +00:00
python_ir.h
python_ivalue.h
python_list.cpp [BE] Fix pybind deprecation warnings (#72376) 2022-02-07 18:33:32 +00:00
python_list.h Use ptrdiff_t rather than ssize_t (#71271) 2022-01-13 12:41:53 -08:00
python_sugared_value.cpp (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
python_sugared_value.h (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
python_tracer.cpp
python_tracer.h
python_tree_views.cpp Revert D34455360: Multisect successfully blamed D34455360 for test failures 2022-03-08 23:18:54 +00:00
python_tree_views.h
script_init.cpp Clean up profiling mode and profiling executor strategy (#73875) 2022-03-29 18:38:51 +00:00
script_init.h
update_graph_executor_opt.cpp
update_graph_executor_opt.h Remove WindowsTorchApiMacro.h in favor of Export.h (#69585) 2021-12-09 17:30:09 -08:00