Repository navigation
Add an aten.erf kernel - #24908
Add an aten.erf kernel#24908psiddh wants to merge 2 commits into
Conversation
…#24907) Summary: A 3-D transposed convolution (ConvTranspose1d) was not delegated, so models had to rewrite it as a 4-D conv_transpose2d. It now runs on the transposed 2-D kernels with H = 1. Transposed convs with dynamic input, or whose direct user is relu/hardtanh, stay on CPU. This unblocks the upsamplers of streaming audio decoders, e.g. text-to-speech in the browser. Follow-up (pre-existing): ConvTranspose2d -> BatchNorm2d -> ReLU still fuses into a transposed conv_with_clamp, which fails to load. Reviewed By: SS-JIA Differential Revision: D127010336
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
🔗 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. ❌ 1 Unclassified FailureAs of commit 096a944 with merge base 80c14ec ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
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:
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