Repository navigation
Match softmax input storage and layout to its output (#24437) - #24437
JakeStevens wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24437
Note: Links to docs will display an error until the docs builds have been completed. ❌ 9 Pending, 2 Unclassified FailuresAs of commit 20e83ad with merge base cb3f24e ( 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:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129088170. |
This PR needs a
|
Summary: ## Ulterior Motive Run native Swin attention softmaxes across buffer and texture storage plans. ## Rationale **What**: Repack the input of `_softmax` and `_log_softmax` when its storage or layout differs from the planned output. **Why**: The kernel reads its input using the output's storage type and texture layout. A buffer bound to a texture shader can crash; a differently packed texture can return misplaced values. ## Details - Adapt only the `self` input of these two operators. - Reuse the existing repack helper and leave matching representations unchanged. - Cover buffer-to-texture and width-to-channels-packed inputs with independent softmax references. Authored with AI using Metamate on agentcloud. Differential Revision: D129088170
d345309 to
20e83ad
Compare
Summary:
Ulterior Motive
Run native Swin attention softmaxes across buffer and texture storage plans.
Rationale
What: Repack the input of
_softmaxand_log_softmaxwhen its storage or layout differs from the planned output.Why: The kernel reads its input using the output's storage type and texture layout. A buffer bound to a texture shader can crash; a differently packed texture can return misplaced values.
Details
selfinput of these two operators.Authored with AI using Metamate on agentcloud.
Differential Revision: D129088170