Skip to content

Commit bdafb22

Browse files
pytorchbotSS-JIA
andauthored
[ET-VK] Fix debug build + print maximum storage buffer size with device limits
## Context Two simple fixes/improvements. 1. Recently the interface to retrieve a `VkPipeline` from a pipeline cache was updated. Some code hidden behind debug compile flags was not updated. Updating the call site fixes building Vulkan with `etvk.debug = 1`. 2. Print the maximum storage buffer size when printing out the physical device limits. This is useful information to have. Differential Revision: [D70718388](https://our.internmc.facebook.com/intern/diff/D70718388/) ghstack-source-id: 270150972 Pull Request resolved: #9016 Co-authored-by: Stephen Jia <ssjia@meta.com>
1 parent 6eee931 commit bdafb22

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

backends/vulkan/runtime/api/Context.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ VkPipeline Context::get_shader_pipeline(
274274
VkPipelineLayout pipeline_layout =
275275
pipeline_layout_cache().retrieve(shader_layout, push_constants_size);
276276

277-
vkapi::SpecVarList spec_constants_full_list = {4u, 4u, 1u};
278-
spec_constants_full_list.append(spec_constants);
277+
const utils::WorkgroupSize local_workgroup_size(4u, 4u, 1u);
279278

280279
VkPipeline pipeline = pipeline_cache().retrieve(
281280
{pipeline_layout,
282281
shader_cache().retrieve(shader),
283-
spec_constants_full_list});
282+
spec_constants,
283+
local_workgroup_size});
284284

285285
return pipeline;
286286
}

backends/vulkan/runtime/vk_api/Adapter.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ std::string Adapter::stringize() const {
274274
PRINT_PROP(limits, maxImageDimension1D);
275275
PRINT_PROP(limits, maxImageDimension2D);
276276
PRINT_PROP(limits, maxImageDimension3D);
277+
PRINT_PROP(limits, maxStorageBufferRange);
277278
PRINT_PROP(limits, maxTexelBufferElements);
278279
PRINT_PROP(limits, maxPushConstantsSize);
279280
PRINT_PROP(limits, maxMemoryAllocationCount);

0 commit comments

Comments
 (0)