Skip to content

Commit 3e53705

Browse files
committed
[ET-VK] Replacing use of adaptive_work_group_size function by create_local_wg_size function for slice and copy ops.
Pull Request resolved: #7016 This diff replaces the use of the adaptive_work_group_size function with create_local_wg_size function for slice and copy ops, which is better tuned for improving shader performance. ghstack-source-id: 256094684 @exported-using-ghexport Differential Revision: [D66308779](https://our.internmc.facebook.com/intern/diff/D66308779/)
1 parent eeab679 commit 3e53705

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backends/vulkan/runtime/graph/ops/impl/Copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void add_copy_channel_offset_node(
135135
utils::safe_downcast<uint32_t>(dim_at<kWidth4D>(in_sizes)),
136136
utils::safe_downcast<uint32_t>(dim_at<kHeight4D>(in_sizes)),
137137
utils::safe_downcast<uint32_t>(dst_last_z - dst_first_z + 1)};
138-
uvec3 local_size = adaptive_work_group_size(global_size);
138+
uvec3 local_size = graph.create_local_wg_size(global_size);
139139

140140
const struct Block final {
141141
ivec3 range;

backends/vulkan/runtime/graph/ops/impl/Slice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void add_slice_tensor_copy_node(
126126
add_dtype_suffix(kernel_name, *t_out);
127127

128128
utils::uvec3 global_size = t_out->logical_limits();
129-
utils::uvec3 local_size = adaptive_work_group_size(global_size);
129+
utils::uvec3 local_size = graph.create_local_wg_size(global_size);
130130

131131
const struct Block final {
132132
int dim;

0 commit comments

Comments
 (0)