Skip to content

Commit 589fe20

Browse files
committed
Use GPUArrays accumulation implementation
1 parent 157e5c6 commit 589fe20

File tree

3 files changed

+0
-234
lines changed

3 files changed

+0
-234
lines changed

src/Metal.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ include("linalg.jl")
6363
include("utilities.jl")
6464
include("broadcast.jl")
6565
include("mapreduce.jl")
66-
include("accumulate.jl")
6766
include("indexing.jl")
6867
include("random.jl")
6968
include("gpuarrays.jl")

src/accumulate.jl

Lines changed: 0 additions & 202 deletions
This file was deleted.

test/array.jl

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -489,37 +489,6 @@ end
489489
sum(reshape(PermutedDimsArray(reshape(Float32.(1:30), 5, 3, 2), (3, 1, 2)), (10, 3)); dims=1)
490490
end
491491

492-
@testset "accumulate" begin
493-
for n in (0, 1, 2, 3, 10, 10_000, 16384, 16384+1) # small, large, odd & even, pow2 and not
494-
@test testf(x->accumulate(+, x), rand(Float32, n))
495-
@test testf(x->accumulate(+, x), rand(Float32, n, 2))
496-
@test testf(Base.Fix2((x,y)->accumulate(+, x; init=y), rand(Float32)), rand(Float32, n))
497-
end
498-
499-
# multidimensional
500-
for (sizes, dims) in ((2,) => 2,
501-
(3,4,5) => 2,
502-
(1, 70, 50, 20) => 3,)
503-
@test testf(x->accumulate(+, x; dims=dims), rand(-10:10, sizes))
504-
@test testf(x->accumulate(+, x), rand(-10:10, sizes))
505-
end
506-
507-
# using initializer
508-
for (sizes, dims) in ((2,) => 2,
509-
(3,4,5) => 2,
510-
(1, 70, 50, 20) => 3)
511-
@test testf(Base.Fix2((x,y)->accumulate(+, x; dims=dims, init=y), rand(-10:10)), rand(-10:10, sizes))
512-
@test testf(Base.Fix2((x,y)->accumulate(+, x; init=y), rand(-10:10)), rand(-10:10, sizes))
513-
end
514-
515-
# in place
516-
@test testf(x->(accumulate!(+, x, copy(x)); x), rand(Float32, 2))
517-
518-
# specialized
519-
@test testf(cumsum, rand(Float32, 2))
520-
@test testf(cumprod, rand(Float32, 2))
521-
end
522-
523492
@testset "findall" begin
524493
# 1D
525494
@test testf(x->findall(x), rand(Bool, 1000))

0 commit comments

Comments
 (0)