Skip to content

Commit cf6e08d

Browse files
committed
Add max_tasks and min_elems kwargs to Metal ext specialisations
1 parent 5e2b06b commit cf6e08d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ext/AcceleratedKernelsMetalExt.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ function AK.accumulate!(
1414
dims::Union{Nothing, Int}=nothing,
1515
inclusive::Bool=true,
1616

17+
# CPU settings - not used
18+
max_tasks::Int=Threads.nthreads(),
19+
min_elems::Int=1,
20+
1721
# Algorithm choice
1822
alg::AK.AccumulateAlgorithm=AK.ScanPrefixes(),
1923

@@ -39,6 +43,10 @@ function AK.accumulate!(
3943
dims::Union{Nothing, Int}=nothing,
4044
inclusive::Bool=true,
4145

46+
# CPU settings - not used
47+
max_tasks::Int=Threads.nthreads(),
48+
min_elems::Int=1,
49+
4250
# Algorithm choice
4351
alg::AK.AccumulateAlgorithm=AK.ScanPrefixes(),
4452

@@ -63,6 +71,10 @@ function AK.cumsum(
6371
neutral=zero(eltype(src)),
6472
dims::Union{Nothing, Int}=nothing,
6573

74+
# CPU settings - not used
75+
max_tasks::Int=Threads.nthreads(),
76+
min_elems::Int=1,
77+
6678
# Algorithm choice
6779
alg::AK.AccumulateAlgorithm=AK.ScanPrefixes(),
6880

@@ -93,6 +105,10 @@ function AK.cumprod(
93105
neutral=one(eltype(src)),
94106
dims::Union{Nothing, Int}=nothing,
95107

108+
# CPU settings - not used
109+
max_tasks::Int=Threads.nthreads(),
110+
min_elems::Int=1,
111+
96112
# Algorithm choice
97113
alg::AK.AccumulateAlgorithm=AK.ScanPrefixes(),
98114

0 commit comments

Comments
 (0)