Skip to content

Commit abdb4e0

Browse files
authored
parallel tests (#270)
* remove test dependencies from main Project.toml since they are in test/Project.toml * split tests into 3 parts to reduce wall clock time for CI
1 parent 7a13875 commit abdb4e0

File tree

5 files changed

+78
-52
lines changed

5 files changed

+78
-52
lines changed

.codecov.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# https://docs.codecov.io/docs/codecovyml-reference
2+
3+
# There are
4+
# 3 [number of parts] * 3 [number of OS] = 9
5+
# parallel jobs in ci.yml
6+
codecov:
7+
notify:
8+
after_n_builds: 9
9+
comment:
10+
after_n_builds: 9
11+
12+
coverage:
13+
range: 70..95
14+
round: down
15+
precision: 2
16+
17+
github_checks:
18+
annotations: false

.github/workflows/ci-julia-nightly.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
tags: '*'
2020
jobs:
2121
test-julia-nightly:
22-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
22+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.loopvectorization_test }} - ${{ github.event_name }}
2323
runs-on: ${{ matrix.os }}
2424
strategy:
2525
fail-fast: false
@@ -32,6 +32,10 @@ jobs:
3232
- windows-latest
3333
arch:
3434
- x64
35+
loopvectorization_test:
36+
- part1
37+
- part2
38+
- part3
3539
steps:
3640
- uses: actions/checkout@v2
3741
- uses: julia-actions/setup-julia@v1
@@ -52,6 +56,7 @@ jobs:
5256
- uses: julia-actions/julia-runtest@v1
5357
env:
5458
JULIA_NUM_THREADS: 4
59+
LOOPVECTORIZATION_TEST: ${{ matrix.loopvectorization_test }}
5560
- uses: julia-actions/julia-processcoverage@v1
5661
- uses: codecov/codecov-action@v1
5762
with:

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
tags: '*'
2020
jobs:
2121
test:
22-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
22+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.loopvectorization_test }} - ${{ github.event_name }}
2323
runs-on: ${{ matrix.os }}
2424
strategy:
2525
fail-fast: false
@@ -33,6 +33,10 @@ jobs:
3333
- windows-latest
3434
arch:
3535
- x64
36+
loopvectorization_test:
37+
- part1
38+
- part2
39+
- part3
3640
steps:
3741
- uses: actions/checkout@v2
3842
- uses: julia-actions/setup-julia@v1
@@ -53,6 +57,7 @@ jobs:
5357
- uses: julia-actions/julia-runtest@v1
5458
env:
5559
JULIA_NUM_THREADS: 4
60+
LOOPVECTORIZATION_TEST: ${{ matrix.loopvectorization_test }}
5661
- uses: julia-actions/julia-processcoverage@v1
5762
- uses: codecov/codecov-action@v1
5863
with:

Project.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,3 @@ ThreadingUtilities = "0.4.2"
3232
UnPack = "1"
3333
VectorizationBase = "0.20.4"
3434
julia = "1.5"
35-
36-
[extras]
37-
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
38-
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
39-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
40-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
41-
42-
[targets]
43-
test = ["Aqua", "InteractiveUtils", "Random", "Test"]

test/runtests.jl

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import InteractiveUtils, Aqua
44

55
InteractiveUtils.versioninfo(stdout; verbose = true)
66

7+
const LOOPVECTORIZATION_TEST = get(ENV, "LOOPVECTORIZATION_TEST", "all")
78
const START_TIME = time()
89

910
@show LoopVectorization.register_count()
@@ -12,73 +13,79 @@ const START_TIME = time()
1213

1314
@time @testset "LoopVectorization.jl" begin
1415

15-
@time Aqua.test_all(LoopVectorization)
16-
# @test isempty(detect_unbound_args(LoopVectorization))
16+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part1"
17+
@time Aqua.test_all(LoopVectorization)
18+
# @test isempty(detect_unbound_args(LoopVectorization))
1719

18-
@time include("printmethods.jl")
20+
@time include("printmethods.jl")
1921

20-
@time include("can_avx.jl")
22+
@time include("can_avx.jl")
2123

22-
@time include("fallback.jl")
24+
@time include("fallback.jl")
2325

24-
@time include("utils.jl")
26+
@time include("utils.jl")
2527

26-
@time include("arraywrappers.jl")
28+
@time include("arraywrappers.jl")
2729

28-
@time include("check_empty.jl")
30+
@time include("check_empty.jl")
2931

30-
@time include("loopinductvars.jl")
32+
@time include("loopinductvars.jl")
3133

32-
@time include("shuffleloadstores.jl")
34+
@time include("shuffleloadstores.jl")
3335

34-
if VERSION < v"1.7-DEV"
35-
@time include("zygote.jl")
36-
else
37-
println("Skipping Zygote tests.")
38-
end
36+
if VERSION < v"1.7-DEV"
37+
@time include("zygote.jl")
38+
else
39+
println("Skipping Zygote tests.")
40+
end
41+
42+
@time include("offsetarrays.jl")
3943

40-
@time include("offsetarrays.jl")
44+
@time include("tensors.jl")
4145

42-
@time include("tensors.jl")
46+
@time include("map.jl")
4347

44-
@time include("map.jl")
48+
@time include("filter.jl")
4549

46-
@time include("filter.jl")
47-
48-
@time include("mapreduce.jl")
50+
@time include("mapreduce.jl")
4951

50-
@time include("ifelsemasks.jl")
52+
@time include("ifelsemasks.jl")
5153

52-
@time include("dot.jl")
54+
@time include("dot.jl")
55+
56+
@time include("special.jl")
57+
end
5358

54-
@time include("special.jl")
59+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part2"
60+
@time include("gemv.jl")
5561

56-
@time include("gemv.jl")
62+
@time include("rejectunroll.jl")
5763

58-
@time include("rejectunroll.jl")
59-
60-
@time include("miscellaneous.jl")
64+
@time include("miscellaneous.jl")
6165

62-
@time include("copy.jl")
66+
@time include("copy.jl")
67+
68+
@time include("broadcast.jl")
69+
70+
@time include("gemm.jl")
71+
end
6372

64-
@time include("broadcast.jl")
73+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part3"
74+
@time include("threading.jl")
6575

66-
@time include("gemm.jl")
76+
@time include("tullio.jl")
6777

68-
@time include("threading.jl")
78+
@time include("staticsize.jl")
6979

70-
@time include("tullio.jl")
80+
@time include("iteration_bound_tests.jl")
7181

72-
@time include("staticsize.jl")
82+
@time include("outer_reductions.jl")
7383

74-
@time include("iteration_bound_tests.jl")
84+
@time include("upperboundedintegers.jl")
7585

76-
@time include("outer_reductions.jl")
77-
78-
@time include("upperboundedintegers.jl")
79-
80-
if VERSION v"1.6"
81-
@time include("quantum.jl")
86+
if VERSION v"1.6"
87+
@time include("quantum.jl")
88+
end
8289
end
8390
end
8491

0 commit comments

Comments
 (0)