Skip to content

Commit a1d1057

Browse files
authored
Quick work around for SPIRV runner (#4762)
The kernel calling convention has been changed for supporting the global scratch space. This is a quick work around for SPIRV runner to support the global scratch since there is no real global scratch space required by Triton XPU for now. Signed-off-by: Lu,Chengjun <[email protected]>
1 parent ed40670 commit a1d1057

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/SPIRVRunner/SPIRVRunner.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ static void sycl_kernel_launch(sycl::queue &stream, sycl::kernel &kernel_ptr,
285285
"Type entry is missing in JSON argument_list\n");
286286
}
287287
}
288+
if (narg != expected_num_params) {
289+
// global scratch.
290+
cgh.set_arg(narg++, nullptr);
291+
}
288292
if (triton_args.shared_memory) {
289293
using share_mem_t = sycl::local_accessor<int8_t, 1>;
290294
share_mem_t local_buffer = share_mem_t(triton_args.shared_memory, cgh);

0 commit comments

Comments
 (0)