avulisha commented on code in PR #10953:
URL: https://github.com/apache/tvm/pull/10953#discussion_r847322558
##########
src/runtime/vulkan/vulkan_stream.h:
##########
@@ -110,6 +125,7 @@ class VulkanStream {
std::unordered_map<VkDescriptorSet, std::vector<VulkanStreamToken>>
deferred_tokens_;
std::vector<std::function<void(VulkanStreamState*)>> deferred_kernels_;
VkCommandPool cmd_pool_;
+ VulkanStreamProfiler* profiler_;
Review Comment:
> I think this can live on the stack?
The profiler_ is also used from the vulkan_device_api.cc to set/reset the
flags used for inserting debug labels into the vulkan stream. Since the
profiler_ is used in other files, moving profiler_ into the stack may not work.
Please correct if my understanding is wrong
##########
src/runtime/vulkan/vulkan_wrapped_func.cc:
##########
@@ -164,6 +164,15 @@ void VulkanWrappedFunc::operator()(TVMArgs args,
TVMRetValue* rv,
deferred_token.buffers_[i] = descriptor_buffers[i].buffer;
}
device.ThreadLocalStream().LaunchDeferred(deferred_initializer,
deferred_kernel, deferred_token);
+
+ if (device.UseDebugUtilsLabel()) {
+ VkDebugUtilsLabelEXT dispatch_label =
{VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT,
+ NULL,
+ func_name_.c_str(),
+ {0.0f, 0.0f, 0.0f, 0.0f}};
+
device.queue_insert_debug_utils_label_functions->vkQueueInsertDebugUtilsLabelEXT(
+ device.Queue(), &dispatch_label);
+ }
Review Comment:
> Can you add this to the immediate-mode path as well?
>
>
https://github.com/apache/tvm/blob/f18d8d40bab7218a79392b56cf3d7cbcf6917e47/src/runtime/vulkan/vulkan_wrapped_func.cc#L73
>
> RADV supports push_descriptor so when we run on RADV, we are using that
path. And RADV apparently has some support for RGP.
Thanks for the suggestion. I will make the changes and send them for review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]