Skip to content

Commit ca2610e

Browse files
committed
Fix and make accumulate tests easier to run with include
1 parent d7f6829 commit ca2610e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/accumulate.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ALGS = [AK.ScanPrefixes()]
1+
ALGS = AK.AccumulateAlgorithm[AK.ScanPrefixes()]
22

3-
TEST_DECOUPLED_LOOKBACK[] && push!(ALGS, AK.DecoupledLookback())
3+
@isdefined(TEST_DL) && TEST_DL[] && push!(ALGS, AK.DecoupledLookback())
44

55
@testset "accumulate_1d $(alg isa AK.DecoupledLookback ? "DL" : "SP")" for alg in ALGS
66

test/runtests.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using Random
55
import Pkg
66

77
# Set to true when testing backends that support this
8-
const TEST_DECOUPLED_LOOKBACK = Ref{Bool}(false)
8+
const TEST_DL = Ref{Bool}(false)
99

1010
# Pass command-line argument to test suite to install the right backend, e.g.
1111
# julia> import Pkg
@@ -15,19 +15,19 @@ if "--CUDA" in ARGS
1515
using CUDA
1616
CUDA.versioninfo()
1717
const BACKEND = CUDABackend()
18-
TEST_DECOUPLED_LOOKBACK[] = true
18+
TEST_DL[] = true
1919
elseif "--oneAPI" in ARGS
2020
Pkg.add("oneAPI")
2121
using oneAPI
2222
oneAPI.versioninfo()
2323
const BACKEND = oneAPIBackend()
24-
TEST_DECOUPLED_LOOKBACK[] = true
24+
TEST_DL[] = true
2525
elseif "--AMDGPU" in ARGS
2626
Pkg.add("AMDGPU")
2727
using AMDGPU
2828
AMDGPU.versioninfo()
2929
const BACKEND = ROCBackend()
30-
TEST_DECOUPLED_LOOKBACK[] = true
30+
TEST_DL[] = true
3131
elseif "--Metal" in ARGS
3232
Pkg.add("Metal")
3333
using Metal
@@ -40,7 +40,7 @@ elseif "--OpenCL" in ARGS
4040
using OpenCL
4141
OpenCL.versioninfo()
4242
const BACKEND = OpenCLBackend()
43-
TEST_DECOUPLED_LOOKBACK[] = true
43+
TEST_DL[] = true
4444
elseif !@isdefined(BACKEND)
4545
# Otherwise do CPU tests
4646
using InteractiveUtils

0 commit comments

Comments
 (0)