From 043666fda0ae651ea8b18931e4b79dca5486ab08 Mon Sep 17 00:00:00 2001 From: Stephen Jia Date: Fri, 8 Aug 2025 08:04:48 -0700 Subject: [PATCH] [ET-VK][ez] Fix registration for convolution operator ## Context Update the registration of the convolution operator to indicate that the weight tensor is prepacked and should not undergo normal texture limits checking. The current registration may cause valid convolution operators to not be partitioned since the export logic will think the weight tensor is non representable using channels packed textures. An example weight size would be something like [256, 256, 1, 1] which would result in a texture with extents [1, 1, 16384] which may exceed texture limits on some machines. Differential Revision: [D79893086](https://our.internmc.facebook.com/intern/diff/D79893086/) [ghstack-poisoned] --- backends/vulkan/op_registry.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/backends/vulkan/op_registry.py b/backends/vulkan/op_registry.py index e3498cf1792..675143cd7fd 100644 --- a/backends/vulkan/op_registry.py +++ b/backends/vulkan/op_registry.py @@ -435,7 +435,19 @@ def register_2d_pool_op(): ) def register_convolution_op(): return OpFeatures( - inputs_storage=utils.CHANNELS_PACKED_TEXTURE, + inputs_storage=[ + utils.CHANNELS_PACKED_TEXTURE, # input + utils.NO_STORAGE, # weight (prepacked) + utils.NO_STORAGE, # bias (prepacked) + utils.NO_STORAGE, # stride (non tensor) + utils.NO_STORAGE, # padding (non tensor) + utils.NO_STORAGE, # dilation (non tensor) + utils.NO_STORAGE, # transposed (non tensor) + utils.NO_STORAGE, # output_padding (non tensor) + utils.NO_STORAGE, # groups (non tensor) + utils.NO_STORAGE, # output_min (non tensor) + utils.NO_STORAGE, # output_max (non tensor) + ], supports_resize=True, supports_prepacking=True, )