Skip to content

Commit d0df012

Browse files
committed
Update base for Update on "[ET-VK] Using push constants for buffer to image prepack nodes."
This diff enables the use of push constants for buffer to image prepack nodes in the Vulkan runtime graph. Push constants are a more efficient way to pass small amounts of data to shaders, compared to using uniform buffers. * The `nchw_to_*.yaml` files have been updated to include the `USE_PUSH_CONST` flag which is `True` by default, and enables the use of push constants for all `nchw_to_*` operations. * New variants of the `nchw_to_*` operation have been added with suffix `_no_pc`, which do not use push constants. These variants are used for compatibility with testing and utility functions. * The `Convolution.cpp` and `Staging.cpp` files have been updated to pass empty parameter buffers and instead use push constants. Differential Revision: [D70102398](https://our.internmc.facebook.com/intern/diff/D70102398/) [ghstack-poisoned]
1 parent 4792e66 commit d0df012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/vulkan/vulkan_preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ def preprocess( # noqa: C901
150150
program = apply_passes(
151151
program,
152152
[
153+
RemoveRedundantOpsTransform(),
153154
AddmmToLinearTransform(),
154155
FuseQuantizedOpsTransform(program),
155156
SqueezeUnsqueezeInputs(),
156157
FuseViewCopyTransform(),
157158
ViewCopyToSqueezeUnsqueezePass(),
158159
FuseBatchNormWithConvPass(program),
159160
FuseClampPass(),
160-
RemoveRedundantOpsTransform(),
161161
],
162162
)
163163

0 commit comments

Comments
 (0)