Skip to content

Commit e1d8cfb

Browse files
authored
[SYCL][ROCm] Fix kernel launch with multiple dimensions (#4063)
I'm not sure why these were left to `1` but this patch fixes some of the tests in [oneAPI-DirectProgramming ](https://github.com/zjin-lcf/oneAPI-DirectProgramming), such as the matrix multiply and mandelbrot samples. With this patch the samples are now giving correct results on both AMD GPU, and on Nvidia GPU with the ROCm backend (using #4049).
1 parent 5ed48b4 commit e1d8cfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/plugins/rocm/pi_rocm.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,8 @@ pi_result rocm_piEnqueueKernelLaunch(
24892489
}
24902490

24912491
retError = PI_CHECK_ERROR(hipModuleLaunchKernel(
2492-
hipFunc, blocksPerGrid[0], 1, 1, threadsPerBlock[0], 1, 1,
2492+
hipFunc, blocksPerGrid[0], blocksPerGrid[1], blocksPerGrid[2],
2493+
threadsPerBlock[0], threadsPerBlock[1], threadsPerBlock[2],
24932494
kernel->get_local_size(), hipStream, argIndices.data(), nullptr));
24942495

24952496
kernel->clear_local_size();

0 commit comments

Comments
 (0)