From b36e58415f21573a2b46cd1617ae7a31ac1d5793 Mon Sep 17 00:00:00 2001 From: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:24:44 -0800 Subject: [PATCH] [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size. This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance. Differential Revision: [D67676422](https://our.internmc.facebook.com/intern/diff/D67676422/) [ghstack-poisoned] --- backends/vulkan/runtime/graph/ops/impl/Convolution.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/vulkan/runtime/graph/ops/impl/Convolution.cpp b/backends/vulkan/runtime/graph/ops/impl/Convolution.cpp index 1cdd7315f16..6e9adf7d5a2 100644 --- a/backends/vulkan/runtime/graph/ops/impl/Convolution.cpp +++ b/backends/vulkan/runtime/graph/ops/impl/Convolution.cpp @@ -370,11 +370,13 @@ void add_conv2d_node( weight_data, clamp_out); + utils::uvec3 wg_size = create_conv2d_global_wg_size(graph, method, out); + graph.execute_nodes().emplace_back(new DispatchNode( graph, shader, - create_conv2d_global_wg_size(graph, method, out), - graph.create_local_wg_size(out), + wg_size, + graph.create_local_wg_size(wg_size), // Inputs and Outputs {{out, vkapi::MemoryAccessType::WRITE}, {{in, arg_weight, arg_bias}, vkapi::MemoryAccessType::READ}},