[TfLite][GPU/CPU] Added GroupNormalization CPU/GPU kernel 
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/60794/checks?check_run_id=14063992701) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request. Hi @mgokulkrish Can you please sign CLA. Thank you! > Hi @mgokulkrish Can you please sign CLA. Thank you!

Hi @gbaned, I have already signed CLA in this PR, should i do it again ? #60749  Hi @yijie-yang, could you please review this PR. Doing open-source contribution for the first time, would love to learn from the mistakes and improve. > > Hi @mgokulkrish Can you please sign CLA. Thank you!
> 
> Hi @gbaned, I have already signed CLA in this PR, should i do it again ? #60749

Hi @mgokulkrish Sorry for the delay, It shows cla check failed. Can you please make sure to use same GitHub username and email-id associated with it. Thank you! Hi @gbaned, I think the cla now is approved. > Hi @gbaned, I think the cla now is approved.

Hi @mgokulkrish Yes, it is good now. Thank you! Come on, somebody needs check the this merging problem. 
Btw @mgokulkrish did u have interest to make a repo to show how to use GPU to acclerate sd model on Android? sounds very interest for me > Come on, somebody needs check the this merging problem. Btw @mgokulkrish did u have interest to make a repo to show how to use GPU to acclerate sd model on Android? sounds very interest for me

Hi @fuerpy, sorry I do not have open-source setup for it. The main issue for the main model executing via gpu delegate is 5 dimensional tensors due to group normalization, current opensource tflite gpu delegate does not support it. If you are able to combine the whole block on group norm into a single block through MLIR changes in TFLiteConvertor, you can use the kernel in this commit to execute it through custom layer features. @mgokulkrish hello，If I run tflite with the project https://github.com/mgokulkrish/tensorflow

does it mean that this model can also use the GPU on Android

https://huggingface.co/keras-sd/diffusion-model-tflite/tree/main > Hi @mgokulkrish, the recommended way of adding custom op (only supported in C++) is documented in https://www.tensorflow.org/lite/guide/ops_custom.
> 
> This PR makes a lot of changes to the TFLite kernel, which we cannot approve. Please follow the above guide and if there's any issue with it, please create a GitHub issue to follow up.
> 
> Thanks.

Thanks for the review @JunyoungLim , based on the guide of custom op you shared, I think CPU side changes for the kernel should be fine. 

Maybe you could point out which part of GPU changes are wrong or where it is too big for kernel changes, I could learn from it.
Summary of my changes:-
1. added a transformation - adding connections for two sub kernels to calculate mean and variance sum.
2. Added three kernels (tasks) for group norm, group mean sum and group var sum.
3. Added parser and selectors for it (as a custom layer, similar to MaxUnpooing2D which was done similarly before).

I have not modified any existing kernels in my changes. I have not included any changes with respect to MLIR, tflite convertor or tf.experimental_implements ( https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/models/convert/operation_fusion.md ), that I used to merge group normalization to single block. The change just has additional kernels.

Thanks again for reviewing the change, I would like to learn and make contribution in GPU delegate. So, a deep review will be a good learning and review process for me. Hi @sirakiin Can you please review this PR ? Thank you! Hi @sirakiin Can you please review this PR ? Thank you! > Hi @sirakiin Can you please review this PR ? Thank you!

@gbaned Hello, do you have the release aar of this pr? I tried to custom build the release, but it failed. I am trying to develop the Android version of stable diffusion. This is the Android version of stable diffusion I made using onnxruntime https://github.com/ZTMIDGO/Android-Stable-diffusion-ONNX . I hope to develop the Android version of TensorFlow.

 Hi @sirakiin Can you please assist on above comments from @ZTMIDGO. Thank you! Hi @JunyoungLim Can you please assist on above comments from @ZTMIDGO. Thank you! Hi @JunyoungLim Any update on this PR? Please. Thank you! Hi @JunyoungLim Any update on this PR? Please. Thank you! Hi @JunyoungLim Any update on this PR? Please. Thank you! Hi @JunyoungLim Any update on this PR? Please. Thank you! Hi @sirakiin Any update on this PR? Please. Thank you! Hi @sirakiin Any update on this PR? Please. Thank you! Hi @sirakiin Any update on this PR? Please. Thank you!
Added custom layer GroupNormalization in TfLite

-> Needed for executing StableDiffusion Model on GPU in tflite.
```
from keras_cv.models.stable_diffusion.diffusion_model import DiffusionModel
from keras_cv.models.stable_diffusion.decoder import Decoder
```
-> limitations of GPU kernel
        - defined for axis=-1
        - scale and centre should be true
        - channels/groups >= 4

-> single layer group norm accuracy on s23 ultra - mean absolute error of e^-5 on fp32 execution for gpu
   for the configurations present in stable diffusion.