Skip to content

Commit 23b1f40

Browse files
committed
add more log
1 parent a8de459 commit 23b1f40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/vulkan/vulkan.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ VulkanBuffer* CreateBuffer(const VulkanContext& vctx, size_t nbytes, VkBufferUsa
145145

146146
uint32_t mem_type_index = vctx.compute_mtype_index;
147147

148+
LOG(INFO) << "compute_mtype_index: " << vctx.compute_mtype_index;
149+
148150
if (usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) {
149151
// Find a memory type that supports UBO
150152
auto prop = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
@@ -185,6 +187,7 @@ VulkanBuffer* CreateBuffer(const VulkanContext& vctx, size_t nbytes, VkBufferUsa
185187
minfo.memoryTypeIndex = mem_type_index;
186188
VULKAN_CALL(vkAllocateMemory(vctx.device, &minfo, nullptr, &memory));
187189
} else {
190+
LOG(INFO) << "using dedicated allocation";
188191
VkMemoryAllocateInfo minfo;
189192
minfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
190193
minfo.pNext = nullptr;
@@ -1174,6 +1177,7 @@ void VulkanWrappedFunc::operator()(TVMArgs args, TVMRetValue* rv,
11741177
descriptor_buffers.push_back(binfo);
11751178
}
11761179
if (vctx.UseImmediate()) {
1180+
LOG(INFO) << "Using immediate";
11771181
// Can safely capture by reference as this lambda is immediately executed on the calling thread.
11781182
VulkanThreadEntry::ThreadLocal()->Stream(device_id)->Launch([&](VulkanStreamState* state) {
11791183
vkCmdBindPipeline(state->cmd_buffer_, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline->pipeline);

0 commit comments

Comments
 (0)