From 45051b9bcf8d480db7fd6ea340e8a705261de146 Mon Sep 17 00:00:00 2001 From: Sam Gondelman Date: Mon, 10 Mar 2025 18:13:32 -0700 Subject: [PATCH] Don't use designated initializers in QueryPool.cpp (#9116) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/9116 This is a c++20 feature, but not all clients are on c++20. Differential Revision: D70933388 --- backends/vulkan/runtime/vk_api/QueryPool.cpp | 27 ++++++++++---------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/backends/vulkan/runtime/vk_api/QueryPool.cpp b/backends/vulkan/runtime/vk_api/QueryPool.cpp index b029cea7081..2f6d433b887 100644 --- a/backends/vulkan/runtime/vk_api/QueryPool.cpp +++ b/backends/vulkan/runtime/vk_api/QueryPool.cpp @@ -185,19 +185,20 @@ std::vector QueryPool::get_shader_timestamp_data() { std::vector shader_result; for (ShaderDuration& entry : shader_durations_) { shader_result.push_back(ShaderResult{ - .kernel_name = entry.kernel_name, - .dispatch_id = entry.dispatch_id, - .start_time_ns = entry.start_time_ns, - .end_time_ns = entry.end_time_ns, - .metadata = ShaderMetadata{ - .global_workgroup_size = - {entry.global_workgroup_size.width, - entry.global_workgroup_size.height, - entry.global_workgroup_size.depth}, - .local_workgroup_size = - {entry.local_workgroup_size.width, - entry.local_workgroup_size.height, - entry.local_workgroup_size.depth}, + /* .kernel_name = */ entry.kernel_name, + /* .dispatch_id = */ entry.dispatch_id, + /* .start_time_ns = */ entry.start_time_ns, + /* .end_time_ns = */ entry.end_time_ns, + /* .metadata = */ + ShaderMetadata{ + /* .global_workgroup_size = */ + {entry.global_workgroup_size.width, + entry.global_workgroup_size.height, + entry.global_workgroup_size.depth}, + /* .local_workgroup_size = */ + {entry.local_workgroup_size.width, + entry.local_workgroup_size.height, + entry.local_workgroup_size.depth}, }}); } return shader_result;