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

Run optimize_module for int8 quantization #2300

Merged
merged 3 commits into from
Oct 6, 2023
Merged

Run optimize_module for int8 quantization #2300

merged 3 commits into from
Oct 6, 2023

Conversation

pfultz2
Copy link
Collaborator

@pfultz2 pfultz2 commented Oct 5, 2023

This should improve performance and accuracy.

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #2300 (518e9c9) into develop (c7f0fbc) will increase coverage by 0.00%.
Report is 6 commits behind head on develop.
The diff coverage is 100.00%.

❗ Current head 518e9c9 differs from pull request most recent head a026f6f. Consider uploading reports for the commit a026f6f to get more accurate results

@@           Coverage Diff            @@
##           develop    #2300   +/-   ##
========================================
  Coverage    91.50%   91.50%           
========================================
  Files          431      431           
  Lines        16140    16141    +1     
========================================
+ Hits         14769    14770    +1     
  Misses        1371     1371           
Files Coverage Δ
src/quantization.cpp 86.36% <100.00%> (+0.31%) ⬆️

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
c6d283
Rate old
65c37c
Diff Compare
torchvision-resnet50 64 2,323.64 2,324.63 -0.04%
torchvision-resnet50_fp16 64 5,332.53 5,357.98 -0.47%
torchvision-densenet121 32 1,845.48 1,847.88 -0.13%
torchvision-densenet121_fp16 32 3,417.52 3,409.96 0.22%
torchvision-inceptionv3 32 1,291.14 1,296.14 -0.39%
torchvision-inceptionv3_fp16 32 2,536.76 2,534.23 0.10%
cadene-inceptionv4 16 619.85 620.23 -0.06%
cadene-resnext64x4 16 589.67 588.45 0.21%
slim-mobilenet 64 7,218.60 7,215.95 0.04%
slim-nasnetalarge 64 236.36 236.51 -0.06%
slim-resnet50v2 64 2,554.98 2,555.59 -0.02%
bert-mrpc-onnx 8 824.66 825.02 -0.04%
bert-mrpc-tf 1 389.37 389.38 -0.00%
pytorch-examples-wlang-gru 1 298.11 294.47 1.24%
pytorch-examples-wlang-lstm 1 315.40 307.96 2.42%
torchvision-resnet50_1 1 547.76 544.78 0.55%
torchvision-inceptionv3_1 1 300.34 305.19 -1.59%
cadene-dpn92_1 1 356.49 352.21 1.21%
cadene-resnext101_1 1 218.48 220.12 -0.74%
slim-vgg16_1 1 224.10 224.29 -0.08%
slim-mobilenet_1 1 1,502.17 1,497.40 0.32%
slim-inceptionv4_1 1 216.44 214.96 0.69%
onnx-taau-downsample 1 306.77 306.79 -0.01%
dlrm-criteoterabyte 1 21.68 21.67 0.08%
dlrm-criteoterabyte_fp16 1 40.65 40.71 -0.16%
agentmodel 1 5,792.80 5,776.01 0.29%
unet_fp16 2 55.13 55.16 -0.06%
resnet50v1_fp16 1 769.82 766.51 0.43%
bert_base_cased_fp16 64 970.47 971.03 -0.06%
bert_large_uncased_fp16 32 304.96 305.05 -0.03%
bert_large_fp16 1 166.99 166.83 0.10%
distilgpt2_fp16 16 1,351.13 1,350.80 0.02%

This build is OK for merge ✅

@migraphx-bot
Copy link
Collaborator


    :white_check_mark:bert-mrpc-onnx: PASSED: MIGraphX meets tolerance

    :white_check_mark:bert-mrpc-tf: PASSED: MIGraphX meets tolerance

    :white_check_mark:pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance

    :white_check_mark:pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance

    :white_check_mark:torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:torchvision-inceptionv3_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:cadene-dpn92_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:cadene-resnext101_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-vgg16_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-mobilenet_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-inceptionv4_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

    :white_check_mark:agentmodel: PASSED: MIGraphX meets tolerance

    :white_check_mark:unet: PASSED: MIGraphX meets tolerance

    :white_check_mark:resnet50v1: PASSED: MIGraphX meets tolerance

🔴bert_base_cased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


    :white_check_mark:bert_large: PASSED: MIGraphX meets tolerance

🔴distilgpt2_fp16: FAILED: MIGraphX is not within tolerance - check verbose output

Copy link
Collaborator

@TedThemistokleous TedThemistokleous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this as I believe this will effect changes on the EP side/accuracy once I start testing accuracy

@TedThemistokleous TedThemistokleous added enhancement New feature or request roadmap Tasks to finish for a release high priority A PR with high priority for review and merging. labels Oct 6, 2023
@TedThemistokleous TedThemistokleous linked an issue Oct 6, 2023 that may be closed by this pull request
@causten causten self-requested a review October 6, 2023 22:27
@causten causten merged commit 94fcfc0 into develop Oct 6, 2023
8 of 9 checks passed
@causten causten deleted the optimize-int8 branch October 6, 2023 22:33
TedThemistokleous added a commit that referenced this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority A PR with high priority for review and merging. roadmap Tasks to finish for a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Int8 Support for MIGraphX EP Enable ORT accuracy tests to verify int8
5 participants