Repository navigation
Add an aten.erf kernel (#24908) - #24908
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24908
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 714474e with merge base e48f2b5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129036503. |
SS-JIA
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
This PR needs a
|
Summary: Pull Request resolved: pytorch#24908 aten.erf had no WebGPU kernel, so models with a hand-written exact GELU (x * 0.5 * (1 + erf(x / sqrt(2)))) split into many delegates around CPU erf nodes. This adds a one-dispatch erf (rational fit; NaN passes through, +-inf gives +-1) with a resize hook, and the WebGPU partitioner delegates it. Use case: unmodified Hugging Face ESM-2 and BERT-style models, including dynamic sequence length. Reviewed By: SS-JIA Differential Revision: D129036503
096a944 to
714474e
Compare
Summary:
aten.erf had no WebGPU kernel, so models with a hand-written exact GELU (x * 0.5 * (1 + erf(x / sqrt(2)))) split into many delegates around CPU erf nodes.
This adds a one-dispatch erf (rational fit; NaN passes through, +-inf gives +-1) with a resize hook, and the WebGPU partitioner delegates it.
Use case: unmodified Hugging Face ESM-2 and BERT-style models, including dynamic sequence length.
Reviewed By: SS-JIA
Differential Revision: D129036503