pytorch/torch
Vasiliy Kuznetsov 1c0df26597 eager quant: convert mapping for fused QAT Linear-Bn1d (#72796)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72796

Adds the eager mode convert mappint for fused QAT Linear-Bn1d module.

Test Plan:
```
python test/test_quantization.py TestQuantizeEagerQATNumerics.test_linear_bn_workflow
```

Imported from OSS

Reviewed By: jerryzh168

Differential Revision: D34213150

fbshipit-source-id: c08b5eb843dea673fd07c6b7b93dcd3ba03eaec2
(cherry picked from commit 722edfe676)
2022-02-18 13:14:56 +00:00
..
_C Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_masked Generate static docstrings for torch._masked functions. (#72865) 2022-02-17 02:44:16 +00:00
ao eager quant: convert mapping for fused QAT Linear-Bn1d (#72796) 2022-02-18 13:14:56 +00:00
autograd Add autograd tests for addmm, addmv, mm, mv and CSR matrix input (#71949) 2022-02-11 23:14:02 +00:00
backends Fix type annotation for torch.backends.cudnn.allow_tf32 (#72757) 2022-02-14 17:26:37 +00:00
contrib
cpu
csrc Sync lazy_tensor_staging back to master (#72875) 2022-02-18 03:49:46 +00:00
cuda Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
distributed [Reland][FSDP] Implement apply() (#72925) 2022-02-17 21:50:03 +00:00
distributions Revert D34245091: [pytorch][PR] Improve numerical stability of torch.distributions.wishart.Wishart 2022-02-16 21:40:07 +00:00
fft
for_onnx
futures #71946 Remove Python 3.6 references (#72211) 2022-02-08 03:46:20 +00:00
fx [graph_manipulation] Unpack list of outputs (#72940) 2022-02-17 06:38:52 +00:00
jit Make fusion strategy api public (#72639) 2022-02-16 03:45:15 +00:00
legacy
lib
linalg Implement forward AD for linalg.svd and improve svd_backward (#70253) 2022-01-27 18:38:30 +00:00
monitor torch/monitor: TensorboardEventHandler (#71658) 2022-01-27 08:33:55 +00:00
multiprocessing Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
nn eager quant: convert mapping for fused QAT Linear-Bn1d (#72796) 2022-02-18 13:14:56 +00:00
onnx fix: onnx PReLU unidirectional broadcasting 2022-02-16 22:28:08 +00:00
optim Add missing import (#72840) 2022-02-15 19:43:54 +00:00
package Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
profiler
quantization
sparse Add missing entry for sampled_addmm in sparse.rst (#72312) 2022-02-08 00:07:20 +00:00
special
testing only compare attributes for meta tensors (#72508) 2022-02-17 02:33:08 +00:00
utils fix model dump for the lowered module (#72866) 2022-02-17 07:09:44 +00:00
__config__.py
__future__.py
__init__.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_appdirs.py
_classes.py
_deploy.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_jit_internal.py (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
_linalg_utils.py
_lobpcg.py Fix trivial typo at the doc of torch.lobpcg (#71464) 2022-01-20 00:07:39 +00:00
_lowrank.py
_namedtensor_internals.py
_ops.py Add torch.ops per overload API (#72206) 2022-02-11 17:19:06 +00:00
_python_dispatcher.py Revert D34034848: free up dispatch key space (in C++) 2022-02-14 23:29:00 +00:00
_six.py Update min python version to 3.7 in setup.py and mypy configs (#71494) 2022-01-20 00:03:57 +00:00
_sources.py
_storage_docs.py
_tensor_docs.py Revert D33800694: [pytorch][PR] scatter_reduce documentation 2022-02-15 20:10:26 +00:00
_tensor_str.py fixed compilations on xla tensor print (#71147) 2022-01-27 02:28:19 +00:00
_tensor.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_torch_docs.py Revert D33800694: [pytorch][PR] scatter_reduce documentation 2022-02-15 20:10:26 +00:00
_utils_internal.py
_utils.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
_VF.py
_vmap_internals.py
abi-check.cpp
autocast_mode.py
CMakeLists.txt Allow caffe2-specific graph transformations for OperatorExportTypes.ONNX_ATEN_FALLBACK when BUILD_CAFFE2 is ON (#67460) (#68490) 2022-02-10 03:26:48 +00:00
custom_class_detail.h
custom_class.h [jit] Decouple ivalue.h from jit_type.h (#70119) 2022-01-07 18:34:17 -08:00
deploy.h
extension.h
functional.py
hub.py
library.h Codegen: python_torch_functions only include relevant operators (#68693) 2022-01-21 15:37:06 +00:00
overrides.py avoiding adding some functions to the public python API before 1.11 release (#72543) 2022-02-14 19:49:01 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
storage.py Rename Typed/UntypedStorage to _Typed/_UntypedStorage (#72540) 2022-02-15 23:53:01 +00:00
torch_version.py Lazy import packaging in torch_version (#71345) 2022-01-18 22:12:41 +00:00
types.py

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.