Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tune_cfg issue for 3.x static quant #1718

Merged
merged 5 commits into from
Apr 16, 2024
Merged

fix tune_cfg issue for 3.x static quant #1718

merged 5 commits into from
Apr 16, 2024

Conversation

violetch24
Copy link
Contributor

Type of Change

bug fix

Description

fixed tune_cfg loading problem for 3.x static quant API

Expected Behavior & Potential Risk

How has this PR been tested?

UT passed

Dependency Change?

Copy link

github-actions bot commented Apr 10, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 Code Scan Tests workflow
Check ID Status Error details
Code-Scan success
Code-Scan (Bandit Code Scan Bandit) success
Code-Scan (DocStyle Code Scan DocStyle) success
Code-Scan (Pylint Code Scan Pylint) success

These checks are required after the changes to neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/static_quant.py, neural_compressor/torch/algorithms/static_quant/utility.py.

🟢 Model Tests 3x workflow
Check ID Status Error details
Model-Test-3x success
Model-Test-3x (Generate Report GenerateReport) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_bnb) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_ggml) success

These checks are required after the changes to neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/static_quant.py, neural_compressor/torch/algorithms/static_quant/utility.py.

🟢 Unit Tests 3x-PyTorch workflow
Check ID Status Error details
UT-3x-Torch success
UT-3x-Torch (Coverage Compare CollectDatafiles) success
UT-3x-Torch (Unit Test 3x Torch Unit Test 3x Torch) success
UT-3x-Torch (Unit Test 3x Torch baseline Unit Test 3x Torch baseline) success

These checks are required after the changes to neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/static_quant.py, neural_compressor/torch/algorithms/static_quant/utility.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and will be updates every 180 seconds within the next 6 hours. If you have any other questions, contact chensuyue or XuehaoSun for help.

Signed-off-by: Cheng, Zixuan <[email protected]>
Signed-off-by: Cheng, Zixuan <[email protected]>
@Kaihui-intel
Copy link
Contributor

with open(ipex_config_path, "r") as f:
model.tune_cfg = json.load(f)
model.ipex_config_path = ipex_config_path

Why do we need to save the configuration twice in different ways?
Perhaps the first one should be INC's config?

@violetch24
Copy link
Contributor Author

violetch24 commented Apr 12, 2024

with open(ipex_config_path, "r") as f:
model.tune_cfg = json.load(f)
model.ipex_config_path = ipex_config_path

Why do we need to save the configuration twice in different ways?
Perhaps the first one should be INC's config?

model.tune_cfg = json.load(f) is to add a new attribute tune_cfg that includes tuning configurations, and will be used in save API https://github.com/intel/neural-compressor/blob/master/neural_compressor/torch/algorithms/static_quant/save_load.py#L37.

@changwangss
Copy link
Contributor

Could you remove the code about IPEX version lower than 1.12?

@violetch24
Copy link
Contributor Author

Could you remove the code about IPEX version lower than 1.12?

Removed.

@chensuyue chensuyue merged commit ba16504 into master Apr 16, 2024
27 checks passed
@chensuyue chensuyue deleted the zixuan/3x_static branch April 16, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants