neural-compressor icon indicating copy to clipboard operation
neural-compressor copied to clipboard

fix bf16 symbolic_trace bug

Open xin3he opened this issue 1 year ago • 1 comments

Type of Change

bug fix

Description

fix bf16 symbolic_trace bug,

  1. cause abnormal recursive calling.
  2. missing necessary attributes

By moving BF16 fallback ahead of quantization and removing bf16_symbolic_trace, we fix it.

Expected Behavior

google/vit-base-patch16-224 autotuned with bf16 ops works.

How has this PR been tested?

local test

xin3he avatar Jul 01 '24 07:07 xin3he

⚡ 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/adaptor/pytorch.py, neural_compressor/adaptor/pytorch_cpu.yaml, neural_compressor/adaptor/torch_utils/bf16_convert.py.

🟢 Model Tests workflow
Check ID Status Error details
Model-Test success
Model-Test (Generate Report GenerateReport) success
Model-Test (Run ONNX Model resnet50-v1-12) success
Model-Test (Run PyTorch Model resnet18_fx) success
Model-Test (Run TensorFlow Model resnet50v1.5) success
Model-Test (Run TensorFlow Model ssd_resnet50_v1) success

These checks are required after the changes to neural_compressor/adaptor/pytorch.py, neural_compressor/adaptor/pytorch_cpu.yaml, neural_compressor/adaptor/torch_utils/bf16_convert.py.

🟢 Unit Tests basic workflow
Check ID Status Error details
UT-Basic success
UT-Basic (Coverage Compare CollectDatafiles) success
UT-Basic (Unit Test FWKs adaptor Test FWKs adaptor) success
UT-Basic (Unit Test FWKs adaptor baseline Test FWKs adaptor baseline) success
UT-Basic (Unit Test ITEX Test ITEX) success
UT-Basic (Unit Test ITEX baseline Test ITEX baseline) success
UT-Basic (Unit Test Pruning Test PyTorch Pruning) success
UT-Basic (Unit Test Pruning Test TensorFlow Pruning) success
UT-Basic (Unit Test Pruning baseline Test PyTorch Pruning baseline) success
UT-Basic (Unit Test Pruning baseline Test TensorFlow Pruning baseline) success
UT-Basic (Unit Test TF newAPI Test TF newAPI) success
UT-Basic (Unit Test TF newAPI baseline Test TF newAPI baseline) success
UT-Basic (Unit Test User facing API Test User facing API) success
UT-Basic (Unit Test User facing API baseline Test User facing API baseline) success
UT-Basic (Unit Test other basic case Test other basic case) success
UT-Basic (Unit Test other cases baseline Test other cases baseline) success
UT-Basic coverage report
Base coverage PR coverage Diff
Lines 76.095% 76.101% 0.006%
Branches 65.171% 65.194% 0.023%

These checks are required after the changes to neural_compressor/adaptor/pytorch.py, neural_compressor/adaptor/pytorch_cpu.yaml, neural_compressor/adaptor/torch_utils/bf16_convert.py, test/adaptor/pytorch_adaptor/test_adaptor_pytorch_2x.py.

🟢 Unit Tests basic no coverage workflow
Check ID Status Error details
UT-Basic-No-Coverage success
UT-Basic-No-Coverage (Unit Test FWKs adaptor Test FWKs adaptor) success
UT-Basic-No-Coverage (Unit Test Pruning Test PyTorch Pruning) success
UT-Basic-No-Coverage (Unit Test Pruning Test TensorFlow Pruning) success
UT-Basic-No-Coverage (Unit Test User facing API Test User facing API) success
UT-Basic-No-Coverage (Unit Test other basic case Test other basic case) success

These checks are required after the changes to neural_compressor/adaptor/pytorch.py, neural_compressor/adaptor/pytorch_cpu.yaml, neural_compressor/adaptor/torch_utils/bf16_convert.py, test/adaptor/pytorch_adaptor/test_adaptor_pytorch_2x.py.

🟢 Unit Tests ITREX workflow
Check ID Status Error details
UT-ITREX success

These checks are required after the changes to neural_compressor/adaptor/pytorch.py, neural_compressor/adaptor/pytorch_cpu.yaml, neural_compressor/adaptor/torch_utils/bf16_convert.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.

github-actions[bot] avatar Jul 01 '24 07:07 github-actions[bot]