-
Notifications
You must be signed in to change notification settings - Fork 7
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 Tanh Gelu #988
Implement Tanh Gelu #988
Conversation
rdspring1
commented
Jul 8, 2021
•
edited
Loading
edited
- Double backward support for Gelu - [Original and Approximate]
- Add approximate boolean flag to Gelu
- Fast tanh gelu to eager mode - [CPU and CUDA, skip MKLDNN]
- Fast Tanh Gelu to NvFuser composite ops
- Pass Pytorch CI
Add fast-gelu implementation for CPU and CUDA
Is this one ready for review yet? It seems to be still in draft state. |
I'm still working on the passing the PyTorch CI. Would adding a separate TanhGelu op be easier to upstream than adding an approximation flag to Gelu? |
Is this because of the CI failures? |
linking upstream PR: pytorch#61439 |
Update Gelu documenation Update test_nn with tanh gelu Fix test_cpp_api_parity Update torch overrides Enable Gelu for Tensor Expressions Tensor Expressions ignores the approximate flag Add Gelu to UNTRACEABLE_FUNCTIONALS - test/test_fx Update torch/onnx/symbolic_opset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -3497,22 +3497,22 @@ | |||
CPU: gelu_out_cpu | |||
CUDA: gelu_out_cuda | |||
|
|||
- func: gelu(Tensor self) -> Tensor | |||
- func: gelu(Tensor self, bool approximate) -> Tensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, should we default approximate to False just so that we don't have to update tests?
Don't worry too much about upstream XLA test. We can deal with that when we are actually upstreaming. |
I created an XLA PR - pytorch/xla#3039 |
Update Onnx tests
Tests passing. I think we are missing some BC allow list changes, but those shouldn't matter. I'm merging this one. |