pytorch/torch/csrc/jit/api
Elias Ellison 211bac53ef [JIT] Add optimize_for_inference API (#58193)
Summary:
Freezing exists as a pass which partially evaluates your model and applies generic optimizations which should speed it up. Optimize for inference is a counterpart to these optimizations which runs build & server specific optimizations.  The interaction with existing `optimize_frozen_module` is not great, I guess we could just deprecate the API entirely? it was never officially released but just existed to document the `optimize_numerics` keyword.

Eventually, I would like to add a way of adding example inputs but I didnt add that here because they are not being used at all yet. I also have not yet included a way to blacklist individual optimizations, and would like to wait until we move this to Beta and have a little more clarity on how everything will fit together. I also think blacklisting will be an uncommon use case for the current optimizations.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/58193

Reviewed By: bertmaher, navahgar

Differential Revision: D28443714

Pulled By: eellison

fbshipit-source-id: b032355bb2585720a6d2f00c89d0d9a7ef60e649
2021-05-15 15:50:14 -07:00
..
compilation_unit.h [WIP] JIT Static Hooks: adding hooks to class type and adding logic for hook running/compilation (#49544) 2021-01-20 09:09:30 -08:00
function_impl.cpp [DI] Allow explicit taskLauncher for torchscript interpreter (#46865) 2020-11-04 17:07:55 -08:00
function_impl.h [DI] Allow explicit taskLauncher for torchscript interpreter (#46865) 2020-11-04 17:07:55 -08:00
method.h Expose run_async function on torch::jit::Method (#48607) 2020-12-11 11:17:58 -08:00
module_save.cpp [JIT] Enable saving modules with hooks in FBCODE (#51241) 2021-02-01 17:01:44 -08:00
module.cpp [JIT] Add optimize_for_inference API (#58193) 2021-05-15 15:50:14 -07:00
module.h [JIT] Add optimize_for_inference API (#58193) 2021-05-15 15:50:14 -07:00
object.cpp [jit][api][refactor] remove redundant deepcopy implementation (#37538) 2020-05-06 15:41:33 -07:00
object.h Add property binding in torchbind (#50670) 2021-03-03 14:25:52 -08:00