-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
This is currently not supported. Ideally a AK.mapreducedim!
would be used to support it which would make integrating this package in GPUArrays much simpler.
julia> import AcceleratedKernels as AK; a = ones(2,3,4);
julia> reduce(+, a; dims=[1,2], init=0)
1×1×4 Array{Int64, 3}:
[:, :, 1] =
6
[:, :, 2] =
6
[:, :, 3] =
6
[:, :, 4] =
6
julia> AK.reduce(+, a; dims=[1,2], init=0)
ERROR: TypeError: in keyword argument dims, expected Union{Nothing, Int64}, got a value of type Vector{Int64}
Stacktrace:
[1] reduce(op::Function, src::Array{Float64, 3}, backend::KernelAbstractions.CPU; init::Int64, kwargs::@Kwargs{dims::Vector{Int64}})
@ AcceleratedKernels ~/.julia/packages/AcceleratedKernels/xxjhi/src/reduce/reduce.jl:81
[2] top-level scope
@ REPL[6]:1
[3] top-level scope
@ ~/.julia/dev/Metal/src/initialization.jl:80
Metadata
Metadata
Assignees
Labels
No labels