Skip to content

[ExecuTorch][WebGPU] Support byte-packed BOOL storage - #21598

Merged
meta-codesync[bot] merged 1 commit into
gh/JCNTH/205/basefrom
gh/JCNTH/205/head
Aug 7, 2026
Merged

meta-codesync[bot] merged 1 commit into
gh/JCNTH/205/basefrom
gh/JCNTH/205/head

Conversation

@JCNTH

@JCNTH JCNTH commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Support exact byte-packed BOOL tensors

WebGPU storage and transfers require four-byte alignment while serialized BOOL tensors use one logical byte per element. The runtime now preserves exact BOOL dtype and logical byte counts while padding physical storage, uploads, and readback.

Key changes:

  • Compare output — packs guarded tail lanes for arbitrary nonzero lengths.
  • BOOL-to-fp32 — decodes packed values numerically instead of reinterpreting bytes.
  • _to_copy routing — mirrors Vulkan exact-dtype conversion intent in backends/vulkan/runtime/graph/ops/impl/View.cpp:183 while keeping BOOL separate from INT8 and UINT8.
  • Generated sources — refresh WGSL registry output and drift digests.

Logical tensor sizes and existing non-BOOL routes are unchanged.

Co-authored-with: Claude Code.

Differential Revision: D114936143

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21598

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit f741fdc with merge base ad3a71f (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 5, 2026
This was referenced Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync
meta-codesync Bot merged commit 4e006e2 into gh/JCNTH/205/base Aug 7, 2026
172 of 180 checks passed
@meta-codesync
meta-codesync Bot deleted the gh/JCNTH/205/head branch August 7, 2026 17:22
@meta-codesync
meta-codesync Bot temporarily deployed to cherry-pick-bot August 7, 2026 17:22 Inactive
JCNTH added a commit that referenced this pull request Aug 7, 2026
**Support exact byte-packed BOOL tensors**

WebGPU storage and transfers require four-byte alignment while serialized `BOOL` tensors use one logical byte per element. The runtime now preserves exact `BOOL` dtype and logical byte counts while padding physical storage, uploads, and readback.

Key changes:

- Compare output — packs guarded tail lanes for arbitrary nonzero lengths.
- `BOOL`-to-fp32 — decodes packed values numerically instead of reinterpreting bytes.
- `_to_copy` routing — mirrors Vulkan exact-dtype conversion intent in `backends/vulkan/runtime/graph/ops/impl/View.cpp:183` while keeping `BOOL` separate from `INT8` and `UINT8`.
- Generated sources — refresh WGSL registry output and drift digests.

Logical tensor sizes and existing non-`BOOL` routes are unchanged.

Co-authored-with: Claude Code.

Differential Revision: [D114936143](https://our.internmc.facebook.com/intern/diff/D114936143/)
ghstack-source-id: 411044625
Pull-Request: #21598

This branch was previously deployed

2 inactive deployments
cherry-pick-bot — f741fdc8 Deployed Aug 7, 2026 by meta-codesync[bot] via Try to create a PR with ghstack /orig branch #1607
cadence — f741fdc8 Deployed Aug 5, 2026 by JCNTH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants