OSDN Git Service

[mlir][vulkan-runner] Minor fix in timestamp flag for vulkan runner.
authorThomas Raoux <thomasraoux@google.com>
Wed, 20 May 2020 01:56:48 +0000 (18:56 -0700)
committerThomas Raoux <thomasraoux@google.com>
Wed, 20 May 2020 01:56:48 +0000 (18:56 -0700)
The first timestamp query should use VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT.

Differential Revision: https://reviews.llvm.org/D80183

mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp

index 7c3dcff..2c42c19 100644 (file)
@@ -728,7 +728,7 @@ LogicalResult VulkanRuntime::createComputeCommandBuffer() {
                           descriptorSets.data(), 0, 0);
   // Get a timestamp before invoking the compute shader.
   if (queryPool != VK_NULL_HANDLE)
-    vkCmdWriteTimestamp(commandBuffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+    vkCmdWriteTimestamp(commandBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                         queryPool, 0);
   vkCmdDispatch(commandBuffer, numWorkGroups.x, numWorkGroups.y,
                 numWorkGroups.z);