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 {
602
602
event_name.c_str (),
603
603
/* delegate_debug_id = */ -1 ,
604
604
r.start_time_ns ,
605
- r.end_time_ns );
605
+ r.end_time_ns ,
606
+ (void *)(&r.metadata ),
607
+ sizeof (r.metadata ));
606
608
}
607
609
#endif // ET_EVENT_TRACER_ENABLED
608
610
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ std::string stringize(const VkExtent3D& extents) {
176
176
<< " }" ;
177
177
return ss.str ();
178
178
}
179
+
179
180
std::vector<ShaderResult> QueryPool::get_shader_timestamp_data () {
180
181
if (querypool_ == VK_NULL_HANDLE) {
181
182
return {};
@@ -188,7 +189,16 @@ std::vector<ShaderResult> QueryPool::get_shader_timestamp_data() {
188
189
.dispatch_id = entry.dispatch_id ,
189
190
.start_time_ns = entry.start_time_ns ,
190
191
.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
+ }});
192
202
}
193
203
return shader_result;
194
204
}
Original file line number Diff line number Diff line change 26
26
namespace vkcompute {
27
27
namespace vkapi {
28
28
29
+ struct ShaderMetadata final {
30
+ const uint32_t global_workgroup_size[3 ];
31
+ const uint32_t local_workgroup_size[3 ];
32
+ };
33
+
29
34
struct ShaderResult final {
30
35
const std::string kernel_name;
31
36
const uint32_t dispatch_id;
32
37
const uint64_t start_time_ns;
33
38
const uint64_t end_time_ns;
39
+ const ShaderMetadata metadata;
34
40
};
35
41
36
42
struct QueryPoolConfig final {
You can’t perform that action at this time.
0 commit comments