Vectorize op_mean fast path with at::vec for innermost-dim reductions (#21986) - #21986
Open
pssrawat wants to merge 1 commit into
Open
Vectorize op_mean fast path with at::vec for innermost-dim reductions (#21986)#21986pssrawat wants to merge 1 commit into
pssrawat wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21986
Note: Links to docs will display an error until the docs builds have been completed. ❌ 78 New Failures, 1 Cancelled Job, 3 Unrelated Failures, 5 Unclassified FailuresAs of commit 97bf058 with merge base 227fb47 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
@pssrawat has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103682580. |
pssrawat
added a commit
to pssrawat/executorch
that referenced
this pull request
Aug 20, 2026
…pytorch#21986) Summary: `aten.mean.dim` escapes the XNNPACK delegate 49 times for STITO model. This commit adds an optimized `op_mean.cpp` under `kernels/optimized/cpu/` that vectorizes the same fast path with `at::vec::Vectorized`: per-row vector accumulation at the accumulator type's native width, `vec_reduce_all` to fold the lanes, then a scalar tail. Also wires `mean.out` into `optimized.yaml` so the `optimized_native_cpu_ops` umbrella picks it up; portable remains the fallback for builds that don't use the optimized kernel set. Differential Revision: D103682580
pssrawat
force-pushed
the
export-D103682580
branch
from
August 20, 2026 20:27
0a91949 to
a6548f8
Compare
…pytorch#21986) Summary: `aten.mean.dim` escapes the XNNPACK delegate 49 times for STITO model. This commit adds an optimized `op_mean.cpp` under `kernels/optimized/cpu/` that vectorizes the same fast path with `at::vec::Vectorized`: per-row vector accumulation at the accumulator type's native width, `vec_reduce_all` to fold the lanes, then a scalar tail. Also wires `mean.out` into `optimized.yaml` so the `optimized_native_cpu_ops` umbrella picks it up; portable remains the fallback for builds that don't use the optimized kernel set. Differential Revision: D103682580
pssrawat
force-pushed
the
export-D103682580
branch
from
August 20, 2026 20:27
a6548f8 to
97bf058
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
aten.mean.dimescapes the XNNPACK delegate 49 times for STITO model. This commit adds an optimizedop_mean.cppunderkernels/optimized/cpu/that vectorizes the same fast path withat::vec::Vectorized: per-row vector accumulation at the accumulator type's native width,vec_reduce_allto fold the lanes, then a scalar tail.Also wires
mean.outintooptimized.yamlso theoptimized_native_cpu_opsumbrella picks it up; portable remains the fallback for builds that don't use the optimized kernel set.Differential Revision: D103682580