Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ steps:

println("--- :julia: Instantiating project")
Pkg.develop([PackageSpec(path=pwd())])
Pkg.add(url="https://github.com/christiangnrd/GPUArrays.jl", rev="accumulatetests")

println("+++ :julia: Benchmarking")
include("perf/runbenchmarks.jl")'
Expand Down
1 change: 0 additions & 1 deletion src/Metal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ include("linalg.jl")
include("utilities.jl")
include("broadcast.jl")
include("mapreduce.jl")
include("accumulate.jl")
include("indexing.jl")
include("random.jl")
include("gpuarrays.jl")
Expand Down
202 changes: 0 additions & 202 deletions src/accumulate.jl

This file was deleted.

1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
ObjectiveC = "e86c9b32-1129-44ac-8ea0-90d5bb39ded9"
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63"
Expand Down
31 changes: 0 additions & 31 deletions test/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,37 +478,6 @@ end
sum(reshape(PermutedDimsArray(reshape(Float32.(1:30), 5, 3, 2), (3, 1, 2)), (10, 3)); dims=1)
end

@testset "accumulate" begin
for n in (0, 1, 2, 3, 10, 10_000, 16384, 16384+1) # small, large, odd & even, pow2 and not
@test testf(x->accumulate(+, x), rand(Float32, n))
@test testf(x->accumulate(+, x), rand(Float32, n, 2))
@test testf(Base.Fix2((x,y)->accumulate(+, x; init=y), rand(Float32)), rand(Float32, n))
end

# multidimensional
for (sizes, dims) in ((2,) => 2,
(3,4,5) => 2,
(1, 70, 50, 20) => 3,)
@test testf(x->accumulate(+, x; dims=dims), rand(-10:10, sizes))
@test testf(x->accumulate(+, x), rand(-10:10, sizes))
end

# using initializer
for (sizes, dims) in ((2,) => 2,
(3,4,5) => 2,
(1, 70, 50, 20) => 3)
@test testf(Base.Fix2((x,y)->accumulate(+, x; dims=dims, init=y), rand(-10:10)), rand(-10:10, sizes))
@test testf(Base.Fix2((x,y)->accumulate(+, x; init=y), rand(-10:10)), rand(-10:10, sizes))
end

# in place
@test testf(x->(accumulate!(+, x, copy(x)); x), rand(Float32, 2))

# specialized
@test testf(cumsum, rand(Float32, 2))
@test testf(cumprod, rand(Float32, 2))
end

@testset "findall" begin
# 1D
@test testf(x->findall(x), rand(Bool, 1000))
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ if parse(Bool, get(ENV, "BUILDKITE", "false"))
end
end

using Pkg
Pkg.add(url="https://github.com/christiangnrd/GPUArrays.jl", rev="accumulatetests")

# Quit without erroring if Metal loaded without issues on unsupported platforms
if !Sys.isapple()
@warn """Metal.jl succesfully loaded on non-macOS system.
Expand Down