Skip to content

Commit c4aa529

Browse files
pytorchbotkirklandsign
authored andcommitted
[ET-VK][ez] Fix printing shader IRs
## Context As title; similar to #9016 since the interface for `ComputePipeline` descriptor was reverted in #9405. Differential Revision: [D71706868](https://our.internmc.facebook.com/intern/diff/D71706868/) [ghstack-poisoned]
1 parent 5b2d661 commit c4aa529

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

backends/vulkan/runtime/api/Context.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Context* context() {
272272

273273
VkPipeline Context::get_shader_pipeline(
274274
const vkapi::ShaderInfo& shader,
275-
const vkapi::SpecVarList& spec_constants) {
275+
const vkapi::SpecVarList& additional_constants) {
276276
const uint32_t push_constants_size = 128u;
277277

278278
VkDescriptorSetLayout shader_layout =
@@ -281,12 +281,15 @@ VkPipeline Context::get_shader_pipeline(
281281
pipeline_layout_cache().retrieve(shader_layout, push_constants_size);
282282

283283
const utils::WorkgroupSize local_workgroup_size(4u, 4u, 1u);
284+
vkapi::SpecVarList spec_constants = {
285+
SV(local_workgroup_size[0u]),
286+
SV(local_workgroup_size[1u]),
287+
SV(local_workgroup_size[2u])};
288+
289+
spec_constants.append(additional_constants);
284290

285291
VkPipeline pipeline = pipeline_cache().retrieve(
286-
{pipeline_layout,
287-
shader_cache().retrieve(shader),
288-
spec_constants,
289-
local_workgroup_size});
292+
{pipeline_layout, shader_cache().retrieve(shader), spec_constants});
290293

291294
return pipeline;
292295
}

0 commit comments

Comments
 (0)