File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -602,7 +602,9 @@ class VulkanBackend final : public ::executorch::runtime::BackendInterface {
602602 event_name.c_str (),
603603 /* delegate_debug_id = */ -1 ,
604604 r.start_time_ns ,
605- r.end_time_ns );
605+ r.end_time_ns ,
606+ (void *)(&r.metadata ),
607+ sizeof (r.metadata ));
606608 }
607609#endif // ET_EVENT_TRACER_ENABLED
608610
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ std::string stringize(const VkExtent3D& extents) {
176176 << " }" ;
177177 return ss.str ();
178178}
179+
179180std::vector<ShaderResult> QueryPool::get_shader_timestamp_data () {
180181 if (querypool_ == VK_NULL_HANDLE) {
181182 return {};
@@ -188,7 +189,16 @@ std::vector<ShaderResult> QueryPool::get_shader_timestamp_data() {
188189 .dispatch_id = entry.dispatch_id ,
189190 .start_time_ns = entry.start_time_ns ,
190191 .end_time_ns = entry.end_time_ns ,
191- });
192+ .metadata = ShaderMetadata{
193+ .global_workgroup_size =
194+ {entry.global_workgroup_size .width ,
195+ entry.global_workgroup_size .height ,
196+ entry.global_workgroup_size .depth },
197+ .local_workgroup_size =
198+ {entry.local_workgroup_size .width ,
199+ entry.local_workgroup_size .height ,
200+ entry.local_workgroup_size .depth },
201+ }});
192202 }
193203 return shader_result;
194204}
Original file line number Diff line number Diff line change 2626namespace vkcompute {
2727namespace vkapi {
2828
29+ struct ShaderMetadata final {
30+ const uint32_t global_workgroup_size[3 ];
31+ const uint32_t local_workgroup_size[3 ];
32+ };
33+
2934struct ShaderResult final {
3035 const std::string kernel_name;
3136 const uint32_t dispatch_id;
3237 const uint64_t start_time_ns;
3338 const uint64_t end_time_ns;
39+ const ShaderMetadata metadata;
3440};
3541
3642struct QueryPoolConfig final {
You can’t perform that action at this time.
0 commit comments