Skip to content

Conversation

@yiliu30
Copy link
Contributor

@yiliu30 yiliu30 commented Jun 8, 2023

Type of Change

  • Enhancement
  • API change
conf = MixedPrecisionConfig(
    ...
+    quant_level="auto" # auto(default)/0/1
    ...
) 

Description

Usage & Behavior

0: Op-type-wise

conf = MixedPrecisionConfig(quant_level=0) # default precision is bf16
  1. Trail 1: Convert ops into bf16 AMAP
  2. Fallback ops into fp32 by op-type-wise

1: Op-Wise

conf = MixedPrecisionConfig(quant_level=1) # default precision is bf16
  1. Trail 1: Convert ops into bf16 AMAP
  2. Fallback ops into fp32 by op-wise

auto: Op-type-wise -> op-wise, by default

conf = MixedPrecisionConfig(quant_level="auto") # default precision is bf16
  1. Trail 1: Convert ops into bf16 AMAP
  2. Fallback ops into fp32 by op-type-wise
  3. Fallback ops into fp32 by op-wise
  • The docs will be updated by a follow-up PR

How has this PR been tested?

Pre-CI

Dependency Change?

None

yiliu30 added 2 commits June 8, 2023 11:22
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
@yiliu30 yiliu30 added the WIP label Jun 8, 2023
@chensuyue chensuyue added this to the v2.3 milestone Jun 12, 2023
yiliu30 added 2 commits June 15, 2023 13:00
Signed-off-by: yiliu30 <[email protected]>
Signed-off-by: yiliu30 <[email protected]>
@yiliu30 yiliu30 removed the WIP label Jun 15, 2023
@chensuyue chensuyue added the enhancement New feature or request label Jun 27, 2023
@yiliu30 yiliu30 requested review from ftian1 and mengniwang95 June 27, 2023 14:29
Signed-off-by: yiliu30 <[email protected]>
@yiliu30 yiliu30 merged commit 0dc6a92 into master Jul 10, 2023
@yiliu30 yiliu30 deleted the ly/mixed_pre branch July 10, 2023 05:59
yiliu30 pushed a commit to yiliu30/neural-compressor that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants