type check for torch.quantization.quantize_jit (#45548)

Summary:
added type signal for more jit python functions

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

Reviewed By: malfet

Differential Revision: D24010922

Pulled By: walterddr

fbshipit-source-id: 2fdd75482481adf2eddc01b915d7d5720fbb2b82
This commit is contained in:
Rong Rong 2020-09-30 09:15:13 -07:00 committed by Facebook GitHub Bot
parent 939e0389de
commit 4f3920951e
2 changed files with 14 additions and 3 deletions

View File

@ -77,9 +77,6 @@ ignore_errors = True
[mypy-torch.quantization.fake_quantize]
ignore_errors = True
[mypy-torch.quantization.quantize_jit]
ignore_errors = True
[mypy-torch.quantization._numeric_suite]
ignore_errors = True

View File

@ -179,6 +179,20 @@ def _jit_set_texpr_fuser_enabled(enable: _bool): ...
def _jit_set_nvfuser_enabled(enable: _bool) -> _bool: ...
def _jit_pass_canonicalize(graph: Graph): ...
def _jit_pass_erase_shape_information(graph: Graph): ...
def _jit_pass_fold_convbn(module: 'torch.jit.ScriptModule'): ...
def _jit_pass_insert_observers(module: 'torch.jit.ScriptModule',
method_name: str,
qconfig_dict: Dict[str, Any],
inplace: _bool,
quant_type: _int): ...
def _jit_pass_insert_quant_dequant(module: 'torch.jit.ScriptModule',
method_name: str,
inplace: _bool,
debug: _bool,
quant_type: _int): ...
def _jit_pass_quant_finalize(module: 'torch.jit.ScriptModule',
quant_type: _int,
preserved_attrs: Sequence[str]): ...
def _jit_set_profiling_executor(profiling_flag: _bool) -> _bool: ...
def _jit_set_profiling_mode(profiling_flag: _bool) -> _bool: ...
def _jit_try_infer_type(obj: Any) -> JitType: ...