wonnx icon indicating copy to clipboard operation
wonnx copied to clipboard

Erf operator Implementation

Open AmineDiro opened this issue 2 years ago • 2 comments

Hello,

This is implementation on the approximate Erf operator. This operator is needed for models using the GELU activation function for example the majority of transformer models.

Onnx supports Gelu directly but it is starting from opset 20 so I think that this operator is useful for now.

Happy to make changes based on your suggestions !

AmineDiro avatar Dec 21 '23 09:12 AmineDiro

Hi @AmineDiro! Sorry, only just got around to having a look at this. Your PR looks good! I would suggest however placing the Erf calculation itself in the activation templates (here) - otherwise we will end up with many different templates for similar functions.

pixelspark avatar Jan 01 '24 18:01 pixelspark

Hi @pixelspark , No worries, thanks for taking the time to review this PR! I didn't know where to put the function I'll do the necessary modification and push it! Thanks again and happy new year 🎉

AmineDiro avatar Jan 01 '24 21:01 AmineDiro

@pixelspark could you please merge this PR?

sluramod avatar May 16 '24 01:05 sluramod

Sorry, took a while, thanks for the contribution!

pixelspark avatar May 18 '24 14:05 pixelspark