From af4d3b6f87210781bbd4eb6ac46df206e9f7d399 Mon Sep 17 00:00:00 2001 From: ssjia Date: Wed, 11 Feb 2026 12:16:07 -0800 Subject: [PATCH] [ET-VK][qconv2d][ez] Don't use im2col path for general convs This removes the dynamic dispatch logic in q8ta_conv2d() that selected between the im2col and general convolution paths. The function now unconditionally uses q8ta_conv2d_general(). This simplifies the dispatch since the im2col path selection will be handled upstream by the pattern matcher routing to specialized ops (q8ta_conv2d_pw, q8ta_conv2d_dw, etc.) instead of being decided at runtime. Differential Revision: [D93000164](https://our.internmc.facebook.com/intern/diff/D93000164/) [ghstack-poisoned] --- .../runtime/graph/ops/impl/Q8taConv2d.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/backends/vulkan/runtime/graph/ops/impl/Q8taConv2d.cpp b/backends/vulkan/runtime/graph/ops/impl/Q8taConv2d.cpp index c7f34aab7aa..8e8143fda7c 100644 --- a/backends/vulkan/runtime/graph/ops/impl/Q8taConv2d.cpp +++ b/backends/vulkan/runtime/graph/ops/impl/Q8taConv2d.cpp @@ -401,24 +401,7 @@ void q8ta_conv2d_general( } void q8ta_conv2d(ComputeGraph& graph, const std::vector& args) { - // Index into args to extract values needed for dispatch decision - const ValueRef packed_int8_input = args.at(0); - const ValueRef kernel_size = args.at(9); - const ValueRef groups = args.at(13); - - const int32_t groups_val = graph.get_int(groups); - const int64_t IC = graph.size_at(-3, packed_int8_input); - - const int64_t K_h = graph.get_int_list(kernel_size)->at(0); - const int64_t K_w = graph.get_int_list(kernel_size)->at(1); - - // Use im2col path when: non-grouped, input channels multiple of 4, small - // kernel - if (groups_val == 1 && IC % 4 == 0 && K_h <= 3 && K_w <= 3) { - q8ta_conv2d_im2col(graph, args); - } else { - q8ta_conv2d_general(graph, args); - } + q8ta_conv2d_general(graph, args); } REGISTER_OPERATORS {