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

[DML] Add FastGelu #20066

Merged
merged 4 commits into from
Apr 11, 2024
Merged

[DML] Add FastGelu #20066

merged 4 commits into from
Apr 11, 2024

Conversation

PatriceVignola
Copy link
Contributor

Although DML doesn't have a "fast" gelu approximation operator, its standard GELU operator is still faster than having to combine all the separate elementwise operators from different ops.

@sumitsays
Copy link
Contributor

    ML_CHECK_VALID_ARGUMENT(kernelCreationContext.GetOutputCount() == 1);

As bias is an optional input for FastGelu, this check will fail for FastGelu when bias won't be present.


Refers to: onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorBiasGelu.cpp:16 in e745456. [](commit_id = e745456, deletion_comment = False)

Copy link
Contributor

@sumitsays sumitsays left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@PatriceVignola PatriceVignola merged commit 12042a9 into main Apr 11, 2024
92 of 94 checks passed
@PatriceVignola PatriceVignola deleted the user/pavignol/add-fast-gelu branch April 11, 2024 21:40
TedThemistokleous pushed a commit to TedThemistokleous/onnxruntime that referenced this pull request May 7, 2024
Although DML doesn't have a "fast" gelu approximation operator, its
standard GELU operator is still faster than having to combine all the
separate elementwise operators from different ops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants