Skip to content

Commit 6a2c51b

Browse files
committed
fix
1 parent d341f2d commit 6a2c51b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/CUDAKernels.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ end
175175

176176

177177
function KI.kernel_max_work_group_size(::CUDABackend, kikern::KI.KIKernel{<:CUDABackend}; max_work_items::Int=typemax(Int))::Int
178-
Int(min(kikern.kern.pipeline.maxTotalThreadsPerThreadgroup, max_work_items))
178+
kernel_config = launch_configuration(kikern.kern.fun)
179+
180+
Int(min(kernel_config.threads, max_work_items))
179181
end
180182
function KI.max_work_group_size(::CUDABackend)::Int
181183
Int(attribute(device(), CUDA.DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK))

0 commit comments

Comments
 (0)