Skip to content

Conversation

@yuwenzho
Copy link
Contributor

@yuwenzho yuwenzho commented Jul 4, 2023

Type of Change

bug fix
API not change

Description

Bug description:
ONNXRT GPT2 static quantization with diagnosis=True failed with error "missing scale for tensor .."

Optimized Solution:
Get scale and zero point tensor recursivly.
Check name of dump tensor is not empty.
Remove the node if it does not serve as the input or output of any other nodes.

Expected Behavior & Potential Risk

tensors can be inspected correctly for ONNXRT GPT2 static quantization with diagnosis=True

How has this PR been tested?

ONNXRT GPT2 static quantization with diagnosis=True

Dependency Change?

No

@yuwenzho
Copy link
Contributor Author

yuwenzho commented Jul 5, 2023

@bmyrcha Hi, I tested hf_albert-base-v2, hf_gpt2, hf_bart-large with diagnosis=True locally. Please help review. Thanks!

@yuwenzho yuwenzho requested a review from mengniwang95 July 7, 2023 01:30
@chensuyue chensuyue added the bug fix Something isn't working label Jul 17, 2023
@chensuyue chensuyue merged commit f10e263 into master Jul 17, 2023
@chensuyue chensuyue deleted the yuwenzho/diagnosis branch July 17, 2023 06:55
chensuyue pushed a commit to chensuyue/lpot that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants