rusticl/kernel: properly respect device thread limits per dimension
Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
This commit is contained in:
@@ -1005,7 +1005,7 @@ impl Kernel {
|
||||
let total_threads = block.iter().take(work_dim).product::<usize>();
|
||||
if threads != 1 && total_threads < subgroups {
|
||||
for i in 0..work_dim {
|
||||
if grid[i] * total_threads < threads {
|
||||
if grid[i] * total_threads < threads && grid[i] * block[i] <= dim_threads[i] {
|
||||
block[i] *= grid[i];
|
||||
grid[i] = 1;
|
||||
// can only do it once as nothing is cleanly divisible
|
||||
|
||||
Reference in New Issue
Block a user