pytorch/benchmarks/static_runtime
Mike Iovine 873585da2b [SR] Improve set_inputs (#69087)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69087
This diff includes a variety of improvements to `set_inputs` to unify behavior with `torch::jit::Module`:

1. Eliminate code duplication between rvalue/lvalue overloads
2. Add type checks
3. Make input length check a `TORCH_CHECK` instead of a debug check - we have to fail when the wrong number of inputs are passed.
4. `schema` now always includes `self`, even if we release `module_`. This is consistent with `torch::jit::Module`.|
ghstack-source-id: 145599837

Test Plan: `buck test caffe2/benchmarks/static_runtime:static_runtime_cpptest`

Reviewed By: hlu1

Differential Revision: D32711705

fbshipit-source-id: fe97c10b4f03801ba59868b452e7d02b26b3106b
2021-12-15 09:31:19 -08:00
..
CMakeLists.txt [Static Runtime] Test isOptimizableContainerType and getAlwaysAliveValues (#65849) 2021-10-04 20:46:07 -07:00
deep_wide_pt.cc [NOOP][clangformat][codemod] Enable CLANGFORMAT for some folders in caffe2/* (#67746) 2021-11-03 12:23:14 -07:00
deep_wide_pt.h [NOOP][clangformat][codemod] Enable CLANGFORMAT for some folders in caffe2/* (#67746) 2021-11-03 12:23:14 -07:00
deep_wide_pt_bench.cc [NOOP][clangformat][codemod] Enable CLANGFORMAT for some folders in caffe2/* (#67746) 2021-11-03 12:23:14 -07:00
test_static_module.cc [SR] Improve set_inputs (#69087) 2021-12-15 09:31:19 -08:00
test_static_runtime.cc [SR] Fix stack/concat bug (#68777) 2021-12-14 16:26:27 -08:00
test_utils.cc [Static Runtime] Skip ReplaceWithCopy when inputs have writters (#69819) 2021-12-14 09:39:49 -08:00
test_utils.h [Static Runtime] Skip ReplaceWithCopy when inputs have writters (#69819) 2021-12-14 09:39:49 -08:00