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

Add FP8 ONNX tests #3041

Merged
merged 12 commits into from
Jun 12, 2024
Merged

Add FP8 ONNX tests #3041

merged 12 commits into from
Jun 12, 2024

Conversation

ahsan-ca
Copy link
Contributor

@ahsan-ca ahsan-ca commented May 6, 2024

This PR adds ONNX tests for FP8.

@ahsan-ca ahsan-ca added the FP8 issues related to FP8 implemenation label May 6, 2024
@ahsan-ca ahsan-ca self-assigned this May 6, 2024
@ahsan-ca ahsan-ca requested a review from causten as a code owner May 6, 2024 16:53
@ahsan-ca ahsan-ca linked an issue May 6, 2024 that may be closed by this pull request
@ahsan-ca ahsan-ca removed the request for review from causten May 6, 2024 17:10
@ahsan-ca ahsan-ca force-pushed the fp8-onnx-test branch 2 times, most recently from f74f9d2 to 5de8fb9 Compare May 6, 2024 18:17
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.98%. Comparing base (771f294) to head (8b8a2ab).
Report is 137 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3041      +/-   ##
===========================================
+ Coverage    91.97%   91.98%   +0.01%     
===========================================
  Files          489      489              
  Lines        19398    19398              
===========================================
+ Hits         17841    17844       +3     
+ Misses        1557     1554       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented May 6, 2024

Test Batch Rate new
8b8a2a
Rate old
5fcf86
Diff Compare
torchvision-resnet50 64 1,751.04 1,751.74 -0.04%
torchvision-resnet50_fp16 64 4,085.59 4,084.34 0.03%
torchvision-densenet121 32 1,467.12 1,467.39 -0.02%
torchvision-densenet121_fp16 32 2,526.53 2,525.45 0.04%
torchvision-inceptionv3 32 889.64 889.64 0.00%
torchvision-inceptionv3_fp16 32 1,483.78 1,483.57 0.01%
cadene-inceptionv4 16 412.53 412.40 0.03%
cadene-resnext64x4 16 419.75 419.50 0.06%
slim-mobilenet 64 4,006.66 4,006.71 -0.00%
slim-nasnetalarge 64 101.04 101.01 0.02%
slim-resnet50v2 64 1,681.26 1,680.60 0.04%
bert-mrpc-onnx 8 615.10 618.22 -0.51%
bert-mrpc-tf 1 278.45 279.81 -0.49%
pytorch-examples-wlang-gru 1 322.08 319.57 0.79%
pytorch-examples-wlang-lstm 1 325.66 289.36 12.55% 🔆
torchvision-resnet50_1 1 467.58 471.89 -0.91%
cadene-dpn92_1 1 246.40 247.09 -0.28%
cadene-resnext101_1 1 204.36 204.23 0.06%
onnx-taau-downsample 1 206.42 206.24 0.09%
dlrm-criteoterabyte 1 22.92 22.90 0.06%
dlrm-criteoterabyte_fp16 1 42.72 42.73 -0.01%
agentmodel 1 6,406.15 6,323.67 1.30%
unet_fp16 2 34.20 34.21 -0.01%
resnet50v1_fp16 1 605.68 589.36 2.77%
resnet50v1_int8 1 577.80 573.50 0.75%
bert_base_cased_fp16 64 646.25 646.33 -0.01%
bert_large_uncased_fp16 32 199.01 198.99 0.01%
bert_large_fp16 1 117.21 117.54 -0.28%
distilgpt2_fp16 16 1,212.11 1,211.40 0.06%
yolov5s 1 301.61 301.25 0.12%
tinyllama 1 23.33 23.34 -0.05%
vicuna-fastchat 1 133.71 133.65 0.05%
whisper-tiny-encoder 1 244.07 244.39 -0.13%
whisper-tiny-decoder 1 256.25 256.66 -0.16%

Check results before merge 🔆

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented May 6, 2024


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

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

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

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

     ✅ torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-dpn92_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-resnext101_1: PASSED: MIGraphX meets tolerance

     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

     ✅ unet: PASSED: MIGraphX meets tolerance

     ✅ resnet50v1: PASSED: MIGraphX meets tolerance

     ✅ bert_base_cased_fp16: PASSED: MIGraphX meets tolerance

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


     ✅ bert_large: PASSED: MIGraphX meets tolerance

     ✅ yolov5s: PASSED: MIGraphX meets tolerance

     ✅ tinyllama: PASSED: MIGraphX meets tolerance

     ✅ vicuna-fastchat: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-encoder: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-decoder: PASSED: MIGraphX meets tolerance

     ✅ distilgpt2_fp16: PASSED: MIGraphX meets tolerance

@ahsan-ca ahsan-ca requested a review from umangyadav May 6, 2024 20:14
@umangyadav umangyadav requested a review from CharlieL7 May 7, 2024 13:52
Copy link
Member

@umangyadav umangyadav left a comment

Choose a reason for hiding this comment

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

As a next part we should cover more operators for the "verification".

e.g. "reduction" operations like reduce_max, reduce_sum, avgpool, maxpool
math operations like sine, cosine, sqrt etc.
binary ops : division and multiplication

Copy link
Collaborator

@CharlieL7 CharlieL7 left a comment

Choose a reason for hiding this comment

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

Address Umang's comment and should be good to go

@ahsan-ca ahsan-ca force-pushed the fp8-onnx-test branch 7 times, most recently from 83e9726 to 0c078b1 Compare June 5, 2024 13:27
@ahsan-ca ahsan-ca requested a review from umangyadav June 6, 2024 20:08
test/onnx/parse/gemm_fp8_test.cpp Outdated Show resolved Hide resolved
test/onnx/verify/add_fp8_test.cpp Show resolved Hide resolved
test/onnx/verify/gemm_fp8_test.cpp Show resolved Hide resolved
test/onnx/verify/shrink_fp8_test.cpp Show resolved Hide resolved
@ahsan-ca ahsan-ca requested a review from umangyadav June 11, 2024 21:36
@umangyadav umangyadav merged commit c6fc4c1 into develop Jun 12, 2024
45 checks passed
@umangyadav umangyadav deleted the fp8-onnx-test branch June 12, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FP8 issues related to FP8 implemenation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write onnx parser and verify tests for FP8
4 participants