ROCm / AMDMIGraphX

AMD's graph optimization engine.
https://rocm.docs.amd.com/projects/AMDMIGraphX/en/latest/
MIT License
185 stars 86 forks source link

Dont use mixed layouts with convolution #3587

Closed pfultz2 closed 4 days ago

pfultz2 commented 1 week ago

This refactors the layout_nhwc to either make the weights the same layout as the inputs or sets the input and weights to nhwc. Since this only applies to convolution, I renamed the pass to layout_convolution instead.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.17%. Comparing base (2f97579) to head (91ef42a). Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/layout_convolution.cpp 96.42% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3587 +/- ## =========================================== - Coverage 92.18% 92.17% -0.01% =========================================== Files 513 513 Lines 21548 21563 +15 =========================================== + Hits 19863 19876 +13 - Misses 1685 1687 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

migraphx-bot commented 1 week ago
Test Batch Rate new
16195f
Rate old
4b96e1
Diff Compare
torchvision-resnet50 64 3,259.80 3,260.40 -0.02% :white_check_mark:
torchvision-resnet50_fp16 64 6,987.04 6,981.88 0.07% :white_check_mark:
torchvision-densenet121 32 2,436.61 2,436.50 0.00% :white_check_mark:
torchvision-densenet121_fp16 32 4,080.59 4,081.96 -0.03% :white_check_mark:
torchvision-inceptionv3 32 1,628.26 1,638.04 -0.60% :white_check_mark:
torchvision-inceptionv3_fp16 32 2,745.23 2,760.86 -0.57% :white_check_mark:
cadene-inceptionv4 16 765.11 776.56 -1.47% :white_check_mark:
cadene-resnext64x4 16 810.96 811.67 -0.09% :white_check_mark:
slim-mobilenet 64 7,462.50 7,540.50 -1.03% :white_check_mark:
slim-nasnetalarge 64 208.43 211.49 -1.45% :white_check_mark:
slim-resnet50v2 64 3,439.68 3,506.73 -1.91% :white_check_mark:
bert-mrpc-onnx 8 1,148.32 1,147.08 0.11% :white_check_mark:
bert-mrpc-tf 1 467.93 465.87 0.44% :white_check_mark:
pytorch-examples-wlang-gru 1 431.87 423.73 1.92% :white_check_mark:
pytorch-examples-wlang-lstm 1 405.16 389.07 4.14% :high_brightness:
torchvision-resnet50_1 1 796.38 788.22 1.04% :white_check_mark:
cadene-dpn92_1 1 402.82 402.19 0.16% :white_check_mark:
cadene-resnext101_1 1 382.86 382.83 0.01% :white_check_mark:
onnx-taau-downsample 1 346.01 343.07 0.86% :white_check_mark:
dlrm-criteoterabyte 1 33.33 33.34 -0.03% :white_check_mark:
dlrm-criteoterabyte_fp16 1 52.77 52.75 0.03% :white_check_mark:
agentmodel 1 10,111.44 8,325.15 21.46% :high_brightness:
unet_fp16 2 58.87 58.80 0.12% :white_check_mark:
resnet50v1_fp16 1 951.85 953.06 -0.13% :white_check_mark:
resnet50v1_int8 1 1,026.91 1,005.99 2.08% :white_check_mark:
bert_base_cased_fp16 64 1,172.31 1,170.44 0.16% :white_check_mark:
bert_large_uncased_fp16 32 363.33 363.37 -0.01% :white_check_mark:
bert_large_fp16 1 195.76 198.99 -1.62% :white_check_mark:
distilgpt2_fp16 16 2,203.57 2,201.23 0.11% :white_check_mark:
yolov5s 1 529.80 536.00 -1.16% :white_check_mark:
tinyllama 1 43.53 43.45 0.19% :white_check_mark:
vicuna-fastchat 1 175.63 174.10 0.88% :white_check_mark:
whisper-tiny-encoder 1 416.89 418.74 -0.44% :white_check_mark:
whisper-tiny-decoder 1 426.79 425.97 0.19% :white_check_mark:

Check results before merge :high_brightness:

migraphx-bot commented 1 week ago


     :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: cadene-dpn92_1: PASSED: MIGraphX meets tolerance
     :white_check_mark: cadene-resnext101_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
     :white_check_mark: bert_base_cased_fp16: PASSED: MIGraphX meets tolerance
:red_circle:bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output

     :white_check_mark: bert_large: PASSED: MIGraphX meets tolerance
     :white_check_mark: yolov5s: PASSED: MIGraphX meets tolerance
     :white_check_mark: tinyllama: PASSED: MIGraphX meets tolerance
     :white_check_mark: vicuna-fastchat: PASSED: MIGraphX meets tolerance
     :white_check_mark: whisper-tiny-encoder: PASSED: MIGraphX meets tolerance
     :white_check_mark: whisper-tiny-decoder: PASSED: MIGraphX meets tolerance
     :white_check_mark: distilgpt2_fp16: PASSED: MIGraphX meets tolerance