Skip to content

Commit 68db9c2

Browse files
committed
Tweaks
1 parent 6314372 commit 68db9c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MetalKernels.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ function (obj::KI.KIKernel{MetalBackend})(args...; numworkgroups=nothing, workgr
149149
end
150150

151151

152-
function KI.kernel_max_work_group_size(::B, kikern::KI.KIKernel{B}; max_work_items::Int=typemax(Int)) where B<:MetalBackend
153-
min(kikern.kern.pipeline.maxTotalThreadsPerThreadgroup, max_work_items)
152+
function KI.kernel_max_work_group_size(::MetalBackend, kikern::KI.KIKernel{<:MetalBackend}; max_work_items::Int=typemax(Int))::Int
153+
Int(min(kikern.kern.pipeline.maxTotalThreadsPerThreadgroup, max_work_items))
154154
end
155-
function KI.max_work_group_size(::MetalBackend)
156-
device().maxThreadsPerThreadgroup.width
155+
function KI.max_work_group_size(::MetalBackend)::Int
156+
Int(device().maxThreadsPerThreadgroup.width)
157157
end
158-
function KI.multiprocessor_count(::MetalBackend)
158+
function KI.multiprocessor_count(::MetalBackend)::Int
159159
Metal.num_gpu_cores()
160160
end
161161

0 commit comments

Comments
 (0)