Skip to content

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

Open
JCNTH wants to merge 1 commit into
gh/JCNTH/205/basefrom
gh/JCNTH/205/head
Open

[ExecuTorch][WebGPU] Support byte-packed BOOL storage#21598
JCNTH wants to merge 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.

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