AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

Add EmbedLayerNorm Contrib OP

Open TedThemistokleous opened this issue 4 months ago • 0 comments

DOR (Definition of Ready)

Stable diffusion optimizations for workloads that leverage the Onnxruntime framework and MIGraphX EP in some manner looking to leverage Onnxruntime optimizations passes

Description

Task

Add support for the Microsoft Contrib op EmbedLayerNorm Doc: https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#commicrosoftembedlayernormalization

Uses

Seen in Stable diffusion optimizations with Onnxruntime's pipeline's

Seen via using the optimize pipeline script for stable diffusion runs

export MIGRAPHX_DISABLE_CK_GEMM=1
export MIGRAPHX_DISABLE_CK_GEMM_FUSION=1
export MIGRAPHX_DISABLE_CK_GEMM_SOFTMAX_GEMM=1

python optimize_pipeline.py  -i ./sd-v2 -o ./sd-v2-0-migx --float16 --disable_attention  --disable_skip_layer_norm   
--disable_embed_layer_norm --disable_bias_skip_layer_norm  --disable_nhwc_conv   --disable_group_norm 

Reference to the workflow on this found here: https://github.com/ROCm/AMDMIGraphX/issues/1688

Using this would give us the ability to further parse OnnxRT optimizations prior to MIGraphX doing any sort of optimizations

DOD (Definition of Done)

  • [ ] Unit tests for MIGraphX parsing and using the operator
  • [ ] Parser support in MIGraphX using MIGraphX driver and API
  • [ ] Onnxruntime support for operator in MIGraphX EP

TedThemistokleous avatar Aug 20 '25 18:08 TedThemistokleous