Skip to content

[executorch][arm] Add bfloat16 support to VGF backend#20755

Open
SS-JIA wants to merge 1 commit into
gh/SS-JIA/567/basefrom
gh/SS-JIA/567/head
Open

[executorch][arm] Add bfloat16 support to VGF backend#20755
SS-JIA wants to merge 1 commit into
gh/SS-JIA/567/basefrom
gh/SS-JIA/567/head

Conversation

@SS-JIA

@SS-JIA SS-JIA commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Re-land bf16 support for the Arm VGF backend, restoring the two GitHub PRs that were reverted (#20299 and #20660).

bf16 support needs the VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM VkFormat, which was added in Vulkan headers 1.4.350. The internal headers were pinned to 1.4.341, so the original diff-train import of #20299 (D110192953) failed to compile internally and both PRs were reverted in OSS. The Vulkan 1.4.350 header import and the //third-party/khronos selector wiring are the diffs below this one in the stack; this diff is the backend code that depends on them.

Changes:

All source and test changes are mirrored across the fbcode/ and xplat/ copies of the Arm backend.

Differential Revision: D110538232

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

[ghstack-poisoned]
@SS-JIA SS-JIA requested a review from digantdesai as a code owner July 6, 2026 21:59
@pytorch-bot

pytorch-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 12 New Failures, 1 Unrelated Failure

As of commit 1bcd717 with merge base 124b677 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 Jul 6, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 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.

SS-JIA added a commit that referenced this pull request Jul 6, 2026
Pull Request resolved: #20755

Re-land bf16 support for the Arm VGF backend, restoring the two GitHub PRs that were reverted (#20299 and #20660).

bf16 support needs the `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` `VkFormat`, which was added in Vulkan headers 1.4.350. The internal headers were pinned to 1.4.341, so the original diff-train import of #20299 (D110192953) failed to compile internally and both PRs were reverted in OSS. The Vulkan 1.4.350 header import and the `//third-party/khronos` selector wiring are the diffs below this one in the stack; this diff is the backend code that depends on them.

Changes:
- #20299: handle bf16 in `VGFSetup.cpp` (new `FormatScalarKind::BFloat` plus `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` cases in `get_format_component_count`, `get_format_info`, and `get_format_size`), the VGF test infrastructure (`test_pipeline.py`, `runner_utils.py`, `test_matmul.py`), and the `vulkan_utils.sh` SDK bump for OSS parity.
- #20660: extend bf16 test coverage across the VGF op and model tests.

All source and test changes are mirrored across the `fbcode/` and `xplat/` copies of the Arm backend.
ghstack-source-id: 400367995
@exported-using-ghexport

Differential Revision: [D110538232](https://our.internmc.facebook.com/intern/diff/D110538232/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported module: arm Issues related to arm backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants