Skip to content

Commit ca49739

Browse files
authored
Try simplied BK YAML and turn off generic tests on GPU (#265)
1 parent 1c18196 commit ca49739

3 files changed

Lines changed: 87 additions & 109 deletions

File tree

‎.buildkite/pipeline.yml‎

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,28 @@ env:
22
SECRET_CODECOV_TOKEN: "MH6hHjQi7vG2V1Yfotv5/z5Dkx1k5SdyGYlGTFXiQr22XksJgsXaBuvFKUrjC7JwcpBsOVU8103LuMKl3m7VJ35WzHZrOssYycVbdGcb2kloc6xvUOsN2R5BrhCQ4Pii0l6ZeVRjCnZVkcmb0Rf4glGFyfibCrqniry8RLhblsuFKFsijRK4OxiWYEs1IvUulN+ER8tEsEtw4+ZqC5nbLGMSnUG/saPkDQOVIBscvikbKEnBcCXBheGPktF+Y/cy/1Xa+FiBPoZcypwTeAjKG1g0MqyHXjaYekb/7fekaj+hukGaeJSCXxY8KEb2IZCh+Y36Tp6y6qsIp/AdtEnCpQ==;U2FsdGVkX18WQxvGLspPwzC4aDe+U7TXU+itebTbgh8LUkE6GukxxReHYiDZ6IrBiVvSGTVJMquW0c8KsOI1pw=="
33

44
steps:
5-
- label: "Julia v1 -- CUDA"
5+
- label: "Julia {{matrix.julia}} -- {{matrix.queue}} / {{matrix.group}}"
66
plugins:
77
- JuliaCI/julia#v1:
8-
version: "1"
9-
- JuliaCI/julia-test#v1: ~
8+
version: "{{matrix.julia}}"
9+
- JuliaCI/julia-test#v1:
10+
test_args: "{{matrix.group}}"
1011
- JuliaCI/julia-coverage#v1:
1112
dirs:
1213
- src
1314
- ext
1415
agents:
15-
queue: "cuda"
16-
if: build.message !~ /\[skip tests\]/
17-
timeout_in_minutes: 30
18-
19-
- label: "Julia LTS -- CUDA"
20-
plugins:
21-
- JuliaCI/julia#v1:
22-
version: "1.10" # "lts" isn't valid
23-
- JuliaCI/julia-test#v1: ~
24-
- JuliaCI/julia-coverage#v1:
25-
dirs:
26-
- src
27-
- ext
28-
agents:
29-
queue: "cuda"
30-
if: build.message !~ /\[skip tests\]/
31-
timeout_in_minutes: 30
32-
33-
- label: "Julia v1 -- AMDGPU"
34-
plugins:
35-
- JuliaCI/julia#v1:
36-
version: "1"
37-
- JuliaCI/julia-test#v1: ~
38-
- JuliaCI/julia-coverage#v1:
39-
dirs:
40-
- src
41-
- ext
42-
agents:
43-
queue: "rocm"
44-
if: build.message !~ /\[skip tests\]/
45-
timeout_in_minutes: 30
46-
47-
- label: "Julia LTS -- AMDGPU"
48-
plugins:
49-
- JuliaCI/julia#v1:
50-
version: "1.10" # "lts" isn't valid
51-
- JuliaCI/julia-test#v1: ~
52-
- JuliaCI/julia-coverage#v1:
53-
dirs:
54-
- src
55-
- ext
56-
agents:
57-
queue: "rocm"
16+
queue: "{{matrix.queue}}"
5817
if: build.message !~ /\[skip tests\]/
5918
timeout_in_minutes: 30
19+
matrix:
20+
setup:
21+
julia:
22+
- "1.10"
23+
- "1.12"
24+
queue:
25+
- "cuda"
26+
- "rocm"
27+
group:
28+
- "decompositions"
29+
- "mooncake"

‎test/genericlinearalgebra/exponential.jl‎

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,45 @@ using MatrixAlgebraKit: diagview
66
using LinearAlgebra
77
using GenericLinearAlgebra
88

9-
GenericFloats = (BigFloat, Complex{BigFloat})
10-
11-
@testset "exponential! for T = $T" for T in GenericFloats
12-
rng = StableRNG(123)
13-
m = 54
14-
15-
A = project_hermitian!(randn(rng, T, m, m))
16-
D, V = @constinferred eigh_full(A)
17-
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
18-
@testset "algorithm $alg" for alg in algs
19-
expA = @constinferred exponential!(copy(A); alg)
20-
expA2 = @constinferred exponential(A; alg)
21-
@test expA2 ≈ expA
22-
23-
Dexp, Vexp = @constinferred eigh_full(expA)
24-
@test diagview(Dexp) ≈ LinearAlgebra.exp.(diagview(D))
9+
is_buildkite = get(ENV, "BUILDKITE", "false") == "true"
10+
11+
if !is_buildkite
12+
GenericFloats = (BigFloat, Complex{BigFloat})
13+
14+
@testset "exponential! for T = $T" for T in GenericFloats
15+
rng = StableRNG(123)
16+
m = 54
17+
18+
A = project_hermitian!(randn(rng, T, m, m))
19+
D, V = @constinferred eigh_full(A)
20+
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
21+
@testset "algorithm $alg" for alg in algs
22+
expA = @constinferred exponential!(copy(A); alg)
23+
expA2 = @constinferred exponential(A; alg)
24+
@test expA2 ≈ expA
25+
26+
Dexp, Vexp = @constinferred eigh_full(expA)
27+
@test diagview(Dexp) ≈ LinearAlgebra.exp.(diagview(D))
28+
end
2529
end
26-
end
2730

28-
using GenericSchur
29-
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
30-
rng = StableRNG(123)
31-
m = 54
32-
A = project_hermitian!(randn(rng, T1, m, m))
33-
τ = randn(rng, T2)
31+
using GenericSchur
32+
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
33+
rng = StableRNG(123)
34+
m = 54
35+
A = project_hermitian!(randn(rng, T1, m, m))
36+
τ = randn(rng, T2)
3437

35-
D, V = @constinferred eigh_full(A)
36-
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
37-
@testset "algorithm $alg" for alg in algs
38-
expτA = @constinferred exponential!((τ, copy(A)); alg)
39-
expτA2 = @constinferred exponential((τ, A); alg)
40-
@test expτA2 ≈ expτA
38+
D, V = @constinferred eigh_full(A)
39+
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
40+
@testset "algorithm $alg" for alg in algs
41+
expτA = @constinferred exponential!((τ, copy(A)); alg)
42+
expτA2 = @constinferred exponential((τ, A); alg)
43+
@test expτA2 ≈ expτA
4144

42-
Dexp, Vexp = @constinferred eig_full(expτA)
45+
Dexp, Vexp = @constinferred eig_full(expτA)
4346

44-
@test sort(diagview(Dexp); by = real) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = real)
47+
@test sort(diagview(Dexp); by = real) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = real)
48+
end
4549
end
4650
end

‎test/genericschur/exponential.jl‎

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,46 @@ using MatrixAlgebraKit: diagview
66
using LinearAlgebra
77
using GenericSchur
88

9-
GenericFloats = (BigFloat, Complex{BigFloat})
10-
11-
@testset "exponential! for T = $T" for T in GenericFloats
12-
rng = StableRNG(123)
13-
m = 54
14-
15-
A = randn(rng, T, m, m)
16-
D, V = @constinferred eig_full(A)
17-
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
18-
expA_LA = @constinferred exponential(A)
19-
@testset "algorithm $alg" for alg in algs
20-
expA = @constinferred exponential!(copy(A))
21-
expA2 = @constinferred exponential(A; alg = alg)
22-
@test expA ≈ expA_LA
23-
@test expA2 ≈ expA
24-
25-
Dexp, Vexp = @constinferred eig_full(expA)
26-
@test sort(diagview(Dexp); by = imag) ≈ sort(LinearAlgebra.exp.(diagview(D)); by = imag)
9+
is_buildkite = get(ENV, "BUILDKITE", "false") == "true"
10+
11+
if !is_buildkite
12+
GenericFloats = (BigFloat, Complex{BigFloat})
13+
14+
@testset "exponential! for T = $T" for T in GenericFloats
15+
rng = StableRNG(123)
16+
m = 54
17+
18+
A = randn(rng, T, m, m)
19+
D, V = @constinferred eig_full(A)
20+
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
21+
expA_LA = @constinferred exponential(A)
22+
@testset "algorithm $alg" for alg in algs
23+
expA = @constinferred exponential!(copy(A))
24+
expA2 = @constinferred exponential(A; alg = alg)
25+
@test expA ≈ expA_LA
26+
@test expA2 ≈ expA
27+
28+
Dexp, Vexp = @constinferred eig_full(expA)
29+
@test sort(diagview(Dexp); by = imag) ≈ sort(LinearAlgebra.exp.(diagview(D)); by = imag)
30+
end
2731
end
28-
end
2932

30-
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
31-
rng = StableRNG(123)
32-
m = 54
33+
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
34+
rng = StableRNG(123)
35+
m = 54
3336

34-
A = randn(rng, T1, m, m)
35-
τ = randn(rng, T2)
37+
A = randn(rng, T1, m, m)
38+
τ = randn(rng, T2)
3639

37-
D, V = @constinferred eig_full(A)
38-
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
39-
@testset "algorithm $alg" for alg in algs
40-
expτA = @constinferred exponential!((τ, copy(A)))
41-
expτA2 = @constinferred exponential((τ, A); alg)
42-
@test expτA2 ≈ expτA
40+
D, V = @constinferred eig_full(A)
41+
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
42+
@testset "algorithm $alg" for alg in algs
43+
expτA = @constinferred exponential!((τ, copy(A)))
44+
expτA2 = @constinferred exponential((τ, A); alg)
45+
@test expτA2 ≈ expτA
4346

44-
Dexp, Vexp = @constinferred eig_full(expτA)
45-
@test sort(diagview(Dexp); by = x -> (imag(x), real(x))) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = x -> (imag(x), real(x)))
47+
Dexp, Vexp = @constinferred eig_full(expτA)
48+
@test sort(diagview(Dexp); by = x -> (imag(x), real(x))) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = x -> (imag(x), real(x)))
49+
end
4650
end
4751
end

0 commit comments

Comments
 (0)