Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GELU fusion #277

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Implement GELU fusion #277

merged 1 commit into from
Jul 10, 2024

Conversation

robertknight
Copy link
Owner

@robertknight robertknight commented Jul 10, 2024

This initial fusion is based on the ONNX export of PyTorch's nn.GELU, but can accomodate minor variations (eg. very small differences in constant values, swapped operands for add/mul ops). It won't fuse GELU approximations that some older models use.

TODO:

  • Add a test

This initial fusion is based on the ONNX export of PyTorch's `nn.GELU`, but can
accomodate minor variations (eg. very small differences in constant values,
swapped operands for add/mul ops). It won't fuse GELU approximations that some
older models use.
@robertknight robertknight marked this pull request as ready for review July 10, 2024 21:29
@robertknight robertknight merged commit 33c9f57 into main Jul 10, 2024
2 checks passed
@robertknight robertknight deleted the fuse-gelu branch July 10, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant