Skip to content

Commit 66b6e53

Browse files
committed
Parallel tests when run locally.
1 parent b7b508d commit 66b6e53

File tree

5 files changed

+131
-82
lines changed

5 files changed

+131
-82
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
- part1
3737
- part2
3838
- part3
39+
- part4
40+
- part5
3941
steps:
4042
- uses: actions/checkout@v2
4143
- uses: julia-actions/setup-julia@v1

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
- part1
3838
- part2
3939
- part3
40+
- part4
41+
- part5
4042
steps:
4143
- uses: actions/checkout@v2
4244
- uses: julia-actions/setup-julia@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ Manifest.toml
1616
test/Manifest.toml
1717
test/*#*
1818
*#*
19+
test/testresults
1920

2021

test/grouptests.jl

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
const START_TIME = time()
2+
3+
@show LoopVectorization.register_count()
4+
5+
@show RUN_SLOW_TESTS
6+
7+
@time @testset "LoopVectorization.jl" begin
8+
9+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part1"
10+
@time Aqua.test_all(LoopVectorization, ambiguities = VERSION v"1.6")
11+
# @test isempty(detect_unbound_args(LoopVectorization))
12+
13+
@time include("printmethods.jl")
14+
15+
@time include("can_avx.jl")
16+
17+
@time include("fallback.jl")
18+
19+
@time include("utils.jl")
20+
21+
@time include("arraywrappers.jl")
22+
23+
@time include("check_empty.jl")
24+
25+
@time include("loopinductvars.jl")
26+
27+
@time include("shuffleloadstores.jl")
28+
29+
if VERSION < v"1.7-DEV"
30+
@time include("zygote.jl")
31+
else
32+
println("Skipping Zygote tests.")
33+
end
34+
35+
@time include("tensors.jl")
36+
37+
@time include("map.jl")
38+
39+
@time include("filter.jl")
40+
41+
@time include("mapreduce.jl")
42+
43+
@time include("ifelsemasks.jl")
44+
45+
@time include("dot.jl")
46+
47+
@time include("special.jl")
48+
49+
@time include("multiassignments.jl")
50+
51+
@time include("reduction_untangling.jl")
52+
end
53+
54+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part2"
55+
@time include("gemv.jl")
56+
57+
@time include("rejectunroll.jl")
58+
59+
@time include("miscellaneous.jl")
60+
61+
@time include("copy.jl")
62+
63+
@time include("broadcast.jl")
64+
end
65+
66+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part3"
67+
@time include("threading.jl")
68+
69+
@time include("tullio.jl")
70+
71+
@time include("staticsize.jl")
72+
73+
@time include("iteration_bound_tests.jl")
74+
75+
@time include("outer_reductions.jl")
76+
77+
@time include("upperboundedintegers.jl")
78+
79+
if VERSION v"1.6"
80+
@time include("quantum.jl")
81+
end
82+
end
83+
84+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part4"
85+
@time include("offsetarrays.jl")
86+
end
87+
88+
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part5"
89+
@time include("gemm.jl")
90+
end
91+
92+
end
93+
94+
const ELAPSED_MINUTES = (time() - START_TIME)/60
95+
# @test ELAPSED_MINUTES < 180
96+
@test ELAPSED_MINUTES < 300

test/runtests.jl

Lines changed: 30 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -5,95 +5,43 @@ import InteractiveUtils, Aqua
55
InteractiveUtils.versioninfo(stdout; verbose = true)
66

77
const LOOPVECTORIZATION_TEST = get(ENV, "LOOPVECTORIZATION_TEST", "all")
8-
const START_TIME = time()
98

10-
@show LoopVectorization.register_count()
11-
12-
@show RUN_SLOW_TESTS
13-
14-
@time @testset "LoopVectorization.jl" begin
15-
16-
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part1"
17-
@time Aqua.test_all(LoopVectorization, ambiguities = VERSION v"1.6")
18-
# @test isempty(detect_unbound_args(LoopVectorization))
19-
20-
@time include("printmethods.jl")
21-
22-
@time include("can_avx.jl")
23-
24-
@time include("fallback.jl")
25-
26-
@time include("utils.jl")
27-
28-
@time include("arraywrappers.jl")
29-
30-
@time include("check_empty.jl")
31-
32-
@time include("loopinductvars.jl")
33-
34-
@time include("shuffleloadstores.jl")
35-
36-
if VERSION < v"1.7-DEV"
37-
@time include("zygote.jl")
38-
else
39-
println("Skipping Zygote tests.")
9+
if LOOPVECTORIZATION_TEST == "all"
10+
NUMGROUPS = 5
11+
processes = Vector{Base.Process}(undef, NUMGROUPS)
12+
paths = Vector{String}(undef, NUMGROUPS)
13+
ios = Vector{IOStream}(undef, NUMGROUPS)
14+
tmp = tempdir();
15+
for i 1:NUMGROUPS
16+
path, io = mktemp(tmp)
17+
paths[i] = path
18+
ios[i] = io
19+
env = copy(ENV)
20+
env["LOOPVECTORIZATION_TEST"] = "part$i"
21+
env["JULIA_NUM_THREADS"] = string(Threads.nthreads())
22+
processes[i] = run(pipeline(setenv(`$(Base.julia_cmd()) $(@__FILE__)`, env), stderr = io, stdout = io), wait=false)
23+
end
24+
for i 1:NUMGROUPS
25+
proc = processes[i]
26+
while process_running(proc)
27+
sleep(5)
4028
end
41-
42-
@time include("offsetarrays.jl")
43-
44-
@time include("tensors.jl")
45-
46-
@time include("map.jl")
47-
48-
@time include("filter.jl")
49-
50-
@time include("mapreduce.jl")
51-
52-
@time include("ifelsemasks.jl")
53-
54-
@time include("dot.jl")
55-
56-
@time include("special.jl")
57-
58-
@time include("multiassignments.jl")
59-
60-
@time include("reduction_untangling.jl")
29+
close(ios[i])
30+
run(`cat $(paths[i])`)
6131
end
62-
63-
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part2"
64-
@time include("gemv.jl")
65-
66-
@time include("rejectunroll.jl")
67-
68-
@time include("miscellaneous.jl")
69-
70-
@time include("copy.jl")
71-
72-
@time include("broadcast.jl")
73-
74-
@time include("gemm.jl")
32+
@testset verbose=true "All" begin
33+
for (i,proc) enumerate(processes)
34+
@testset "part$i" begin
35+
@test success(proc)
36+
end
37+
end
7538
end
39+
else
40+
include("grouptests.jl")
41+
end
7642

77-
@time if LOOPVECTORIZATION_TEST == "all" || LOOPVECTORIZATION_TEST == "part3"
78-
@time include("threading.jl")
79-
80-
@time include("tullio.jl")
81-
82-
@time include("staticsize.jl")
83-
84-
@time include("iteration_bound_tests.jl")
8543

86-
@time include("outer_reductions.jl")
8744

88-
@time include("upperboundedintegers.jl")
8945

90-
if VERSION v"1.6"
91-
@time include("quantum.jl")
92-
end
93-
end
94-
end
9546

96-
const ELAPSED_MINUTES = (time() - START_TIME)/60
97-
# @test ELAPSED_MINUTES < 180
98-
@test ELAPSED_MINUTES < 300
9947

0 commit comments

Comments
 (0)