AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

Add ONNX parsing for SimplifiedLayerNormalization

Open turneram opened this issue 1 year ago • 6 comments

turneram avatar May 29 '24 17:05 turneram

Codecov Report

Attention: Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.26%. Comparing base (e0a2325) to head (6f98953). Report is 151 commits behind head on develop.

Files with missing lines Patch % Lines
src/onnx/parse_simplified_layer_normalization.cpp 92.85% 2 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3129   +/-   ##
========================================
  Coverage    92.26%   92.26%           
========================================
  Files          499      500    +1     
  Lines        20020    20048   +28     
========================================
+ Hits         18471    18497   +26     
- Misses        1549     1551    +2     

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

codecov[bot] avatar May 29 '24 19:05 codecov[bot]

Test Batch Rate new
8f10e7
Rate old
b9cce0
Diff Compare
torchvision-resnet50 64 1,713.97 1,713.09 0.05% :white_check_mark:
torchvision-resnet50_fp16 64 3,810.29 3,810.54 -0.01% :white_check_mark:
torchvision-densenet121 32 1,455.43 1,453.33 0.14% :white_check_mark:
torchvision-densenet121_fp16 32 2,431.94 2,431.93 0.00% :white_check_mark:
torchvision-inceptionv3 32 882.48 883.38 -0.10% :white_check_mark:
torchvision-inceptionv3_fp16 32 1,416.07 1,414.61 0.10% :white_check_mark:
cadene-inceptionv4 16 407.52 407.58 -0.01% :white_check_mark:
cadene-resnext64x4 16 413.54 413.72 -0.05% :white_check_mark:
slim-mobilenet 64 3,822.77 3,822.77 0.00% :white_check_mark:
slim-nasnetalarge 64 97.03 97.02 0.00% :white_check_mark:
slim-resnet50v2 64 1,650.65 1,651.90 -0.08% :white_check_mark:
bert-mrpc-onnx 8 589.47 591.41 -0.33% :white_check_mark:
bert-mrpc-tf 1 289.00 289.91 -0.31% :white_check_mark:
pytorch-examples-wlang-gru 1 335.15 332.28 0.86% :white_check_mark:
pytorch-examples-wlang-lstm 1 298.82 298.17 0.22% :white_check_mark:
torchvision-resnet50_1 1 452.70 453.96 -0.28% :white_check_mark:
cadene-dpn92_1 1 244.70 244.78 -0.03% :white_check_mark:
cadene-resnext101_1 1 189.07 189.18 -0.05% :white_check_mark:
onnx-taau-downsample 1 204.13 203.94 0.09% :white_check_mark:
dlrm-criteoterabyte 1 22.28 22.27 0.03% :white_check_mark:
dlrm-criteoterabyte_fp16 1 41.65 41.62 0.07% :white_check_mark:
agentmodel 1 6,115.91 5,896.57 3.72% :high_brightness:
unet_fp16 2 33.73 33.73 0.01% :white_check_mark:
resnet50v1_fp16 1 561.82 564.20 -0.42% :white_check_mark:
resnet50v1_int8 1 463.79 462.59 0.26% :white_check_mark:
bert_base_cased_fp16 64 620.74 620.70 0.01% :white_check_mark:
bert_large_uncased_fp16 32 193.75 193.75 0.00% :white_check_mark:
bert_large_fp16 1 103.89 103.85 0.05% :white_check_mark:
distilgpt2_fp16 16 1,189.19 1,187.89 0.11% :white_check_mark:
yolov5s 1 297.21 298.42 -0.41% :white_check_mark:
tinyllama 1 23.32 23.34 -0.07% :white_check_mark:
vicuna-fastchat 1 132.70 134.00 -0.98% :white_check_mark:
whisper-tiny-encoder 1 241.38 241.32 0.02% :white_check_mark:
whisper-tiny-decoder 1 245.53 245.93 -0.16% :white_check_mark:

Check results before merge :high_brightness:

migraphx-bot avatar May 29 '24 19:05 migraphx-bot


     :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

migraphx-bot avatar May 29 '24 19:05 migraphx-bot

Where is this spec for this operator?

CharlieL7 avatar Jun 11 '24 00:06 CharlieL7

Where is this spec for this operator?

There isn't actually one for SimplifiedLayerNormalization, but this is the spec for SkipSimplifiedLayerNormalization, which is just add + SLN. That spec does include an optional bias input, but neither of the ORT implementations utilize it, so I omitted it from ours.

turneram avatar Jun 17 '24 16:06 turneram

Looks fine, minor comments. I would like to see the equation that it's supposed to be doing.

The equation is the same as RMS LayerNorm.

turneram avatar Jun 17 '24 16:06 turneram