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 unpack_int4 kernel #3528

Merged
merged 6 commits into from
Oct 18, 2024
Merged

Add unpack_int4 kernel #3528

merged 6 commits into from
Oct 18, 2024

Conversation

music-dino
Copy link
Collaborator

  • Implement JIT kernel for unpack_int4
  • Remove unpack_int4 CPU offloading for GPU target

@music-dino music-dino requested a review from pfultz2 October 15, 2024 12:43
@music-dino music-dino self-assigned this Oct 15, 2024
@music-dino music-dino requested a review from causten as a code owner October 15, 2024 12:43
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.17%. Comparing base (ddc4c0c) to head (fa65b0c).
Report is 136 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3528   +/-   ##
========================================
  Coverage    92.17%   92.17%           
========================================
  Files          512      512           
  Lines        21387    21391    +4     
========================================
+ Hits         19714    19718    +4     
  Misses        1673     1673           

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

Copy link
Contributor

@lakhinderwalia lakhinderwalia left a comment

Choose a reason for hiding this comment

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

Left a couple of minor comments. Approved.

test/ref/unpack_int4.cpp Outdated Show resolved Hide resolved
test/verify/main.cpp Outdated Show resolved Hide resolved
@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
fa65b0
Rate old
275f85
Diff Compare
torchvision-resnet50 64 3,258.03 3,260.33 -0.07%
torchvision-resnet50_fp16 64 6,995.32 6,996.93 -0.02%
torchvision-densenet121 32 2,435.96 2,436.13 -0.01%
torchvision-densenet121_fp16 32 4,086.13 4,080.65 0.13%
torchvision-inceptionv3 32 1,637.39 1,639.01 -0.10%
torchvision-inceptionv3_fp16 32 2,759.10 2,759.60 -0.02%
cadene-inceptionv4 16 776.93 775.88 0.14%
cadene-resnext64x4 16 811.82 811.11 0.09%
slim-mobilenet 64 7,538.22 7,539.27 -0.01%
slim-nasnetalarge 64 211.48 211.54 -0.03%
slim-resnet50v2 64 3,502.95 3,505.47 -0.07%
bert-mrpc-onnx 8 1,148.74 1,151.85 -0.27%
bert-mrpc-tf 1 468.86 463.50 1.16%
pytorch-examples-wlang-gru 1 414.84 411.56 0.80%
pytorch-examples-wlang-lstm 1 379.97 388.27 -2.14%
torchvision-resnet50_1 1 788.03 764.51 3.08% 🔆
cadene-dpn92_1 1 415.37 402.09 3.30% 🔆
cadene-resnext101_1 1 383.97 381.69 0.60%
onnx-taau-downsample 1 343.27 342.54 0.21%
dlrm-criteoterabyte 1 33.35 33.35 0.00%
dlrm-criteoterabyte_fp16 1 52.71 52.74 -0.06%
agentmodel 1 8,509.91 8,186.92 3.95% 🔆
unet_fp16 2 58.97 58.82 0.27%
resnet50v1_fp16 1 941.69 953.22 -1.21%
resnet50v1_int8 1 1,026.06 1,003.11 2.29%
bert_base_cased_fp16 64 1,172.09 1,170.57 0.13%
bert_large_uncased_fp16 32 363.54 363.63 -0.03%
bert_large_fp16 1 198.88 201.70 -1.40%
distilgpt2_fp16 16 2,204.39 2,202.28 0.10%
yolov5s 1 538.65 537.82 0.16%
tinyllama 1 43.45 43.44 0.03%
vicuna-fastchat 1 175.85 173.47 1.37%
whisper-tiny-encoder 1 418.07 418.26 -0.05%
whisper-tiny-decoder 1 425.04 436.61 -2.65%

Check results before merge 🔆

@migraphx-bot
Copy link
Collaborator


     ✅ 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

@causten causten merged commit ea8ec1c into develop Oct 18, 2024
23 checks passed
@causten causten deleted the unpack_int4_kernel branch October 18, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants