Skip to content

[ET-VK][qconv] Add dynamic PACKED_INT8_CONV2D memory layout for device-adaptive conv2d#17810

Merged
SS-JIA merged 2 commits intogh/SS-JIA/454/origfrom
gh/SS-JIA/455/orig
Mar 3, 2026
Merged

[ET-VK][qconv] Add dynamic PACKED_INT8_CONV2D memory layout for device-adaptive conv2d#17810
SS-JIA merged 2 commits intogh/SS-JIA/454/origfrom
gh/SS-JIA/455/orig

Conversation

@pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #17794 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/455/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/455/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/454/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/455/orig
Differential Revision: D94949134
@diff-train-skip-merge

…e-adaptive conv2d

Performance testing of quantized int8 convolutions reveals that different
algorithms perform better on different GPU architectures: im2col is faster on
Mali while direct convolution is faster on Adreno. The optimal memory layout
differs per algorithm (4C for im2col, 4C1W for direct convolution).

This introduces a new "dynamic" memory layout PACKED_INT8_CONV2D that is
serialized at export time and resolved to a concrete layout at runtime based
on the device's GPU architecture. The resolution logic in ResolveLayouts.cpp
mirrors the im2col vs direct convolution decision in Q8taConv2d.cpp.

Differential Revision: [D94949134](https://our.internmc.facebook.com/intern/diff/D94949134/)

ghstack-source-id: 346525918
Pull Request resolved: #17794
@pytorchbot pytorchbot requested a review from SS-JIA as a code owner March 3, 2026 08:29
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 3, 2026

🔗 Helpful Links

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

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

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 Mar 3, 2026
Add the ability to override the Vulkan device name at runtime so that
device-adaptive code paths (e.g. memory layout selection) can be tested
on hardware that doesn't match the overridden device type.

PhysicalDevice::override_device_name() and Adapter::override_device_name()
are added behind VULKAN_DEBUG. The device type detection logic is refactored
into a reusable determine_device_type() helper to avoid duplication between
the constructor and the override function.

All test binaries in fb/test/models/ (classification, greenscreen, scenex,
skin_seg) now accept --gpu_name to invoke the override before loading the
model. The Skycastle CI workflows are updated to re-run classification and
greenscreen tests with --gpu_name Mali-G715 in addition to the default run.

Differential Revision: [D94949136](https://our.internmc.facebook.com/intern/diff/D94949136/)

ghstack-source-id: 346525920
Pull Request resolved: #17795
@SS-JIA SS-JIA merged commit 7b5d9f6 into gh/SS-JIA/454/orig Mar 3, 2026
168 of 169 checks passed
@SS-JIA SS-JIA deleted the gh/SS-JIA/455/orig branch March 3, 2026 14:58
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