Skip to content

Commit

Permalink
Update on "[quant] Move the order of x86 engine to avoid changing the…
Browse files Browse the repository at this point in the history
… default qengine"

since the default qengine is the last element of the engine in supported_engines list, adding x86 qengine in the end of the list changes the default quantized engine as well. this PR will be a short term fix to revert the changes. We have an issue here to track the proper fix: #86404

[ghstack-poisoned]
  • Loading branch information
jerryzh168 committed Oct 10, 2022
1 parent 41e897a commit b49927d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torch/ao/quantization/qconfig_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,25 @@ def _get_default_qconfig_mapping(is_qat: bool, backend: str, version: int) -> QC

return qconfig_mapping

def get_default_qconfig_mapping(backend="x86", version=0) -> QConfigMapping:
def get_default_qconfig_mapping(backend="fbgemm", version=0) -> QConfigMapping:
"""
Return the default QConfigMapping for post training quantization.
Args:
* ``backend`` : the quantization backend for the default qconfig mapping, should be
one of ["x86" (default), "fbgemm", "qnnpack", "onednn"]
one of ["x86", "fbgemm" (default), "qnnpack", "onednn"]
* ``version`` : the version for the default qconfig mapping
"""
# TODO: add assert for backend choices
return _get_default_qconfig_mapping(False, backend, version)

def get_default_qat_qconfig_mapping(backend="x86", version=1) -> QConfigMapping:
def get_default_qat_qconfig_mapping(backend="fbgemm", version=1) -> QConfigMapping:
"""
Return the default QConfigMapping for quantization aware training.
Args:
* ``backend`` : the quantization backend for the default qconfig mapping, should be
one of ["x86" (default), "fbgemm", "qnnpack", "onednn"]
one of ["x86", "fbgemm" (default), "qnnpack", "onednn"]
* ``version`` : the version for the default qconfig mapping
"""
return _get_default_qconfig_mapping(True, backend, version)
Expand Down

0 comments on commit b49927d

Please sign in to comment.