SIGN IN SIGN UP

Address failing inf/nan gelu test (#2046)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2046

ATen doesn't consistently handle the inf/-inf case. Hence, skipping test for ATen

Also discovered, while looking into this, that the portable kernel would return -nan when the input was -inf. However, gelu(-inf) should be 0.

Updated the portable kernel to ensure the proper handling of the infinities. Also updated the test, since the -inf case wasn't tested before.

bypass-github-pytorch-ci-checks

Reviewed By: kimishpatel, dbort

Differential Revision: D53960466

fbshipit-source-id: 8d19f06e2292b7ca7691705fd7e3dbbe8196a61e
M
Manuel Candales committed
1aa395a7454d4cd38eaa81fc4e33c75f61808ba1
Parent: 2006cc0
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 2/23/2024, 6:43:09 PM