Skip to content
Merged
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
62 changes: 16 additions & 46 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,28 @@ env:
SECRET_CODECOV_TOKEN: "MH6hHjQi7vG2V1Yfotv5/z5Dkx1k5SdyGYlGTFXiQr22XksJgsXaBuvFKUrjC7JwcpBsOVU8103LuMKl3m7VJ35WzHZrOssYycVbdGcb2kloc6xvUOsN2R5BrhCQ4Pii0l6ZeVRjCnZVkcmb0Rf4glGFyfibCrqniry8RLhblsuFKFsijRK4OxiWYEs1IvUulN+ER8tEsEtw4+ZqC5nbLGMSnUG/saPkDQOVIBscvikbKEnBcCXBheGPktF+Y/cy/1Xa+FiBPoZcypwTeAjKG1g0MqyHXjaYekb/7fekaj+hukGaeJSCXxY8KEb2IZCh+Y36Tp6y6qsIp/AdtEnCpQ==;U2FsdGVkX18WQxvGLspPwzC4aDe+U7TXU+itebTbgh8LUkE6GukxxReHYiDZ6IrBiVvSGTVJMquW0c8KsOI1pw=="

steps:
- label: "Julia v1 -- CUDA"
- label: "Julia {{matrix.julia}} -- {{matrix.queue}} / {{matrix.group}}"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-test#v1: ~
version: "{{matrix.julia}}"
- JuliaCI/julia-test#v1:
test_args: "{{matrix.group}}"
- JuliaCI/julia-coverage#v1:
dirs:
- src
- ext
agents:
queue: "cuda"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 30

- label: "Julia LTS -- CUDA"
plugins:
- JuliaCI/julia#v1:
version: "1.10" # "lts" isn't valid
- JuliaCI/julia-test#v1: ~
- JuliaCI/julia-coverage#v1:
dirs:
- src
- ext
agents:
queue: "cuda"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 30

- label: "Julia v1 -- AMDGPU"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-test#v1: ~
- JuliaCI/julia-coverage#v1:
dirs:
- src
- ext
agents:
queue: "rocm"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 30

- label: "Julia LTS -- AMDGPU"
plugins:
- JuliaCI/julia#v1:
version: "1.10" # "lts" isn't valid
- JuliaCI/julia-test#v1: ~
- JuliaCI/julia-coverage#v1:
dirs:
- src
- ext
agents:
queue: "rocm"
queue: "{{matrix.queue}}"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 30
matrix:
setup:
julia:
- "1.10"
- "1.12"
queue:
- "cuda"
- "rocm"
group:
- "decompositions"
- "mooncake"
66 changes: 35 additions & 31 deletions test/genericlinearalgebra/exponential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,45 @@ using MatrixAlgebraKit: diagview
using LinearAlgebra
using GenericLinearAlgebra

GenericFloats = (BigFloat, Complex{BigFloat})

@testset "exponential! for T = $T" for T in GenericFloats
rng = StableRNG(123)
m = 54

A = project_hermitian!(randn(rng, T, m, m))
D, V = @constinferred eigh_full(A)
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expA = @constinferred exponential!(copy(A); alg)
expA2 = @constinferred exponential(A; alg)
@test expA2 ≈ expA

Dexp, Vexp = @constinferred eigh_full(expA)
@test diagview(Dexp) ≈ LinearAlgebra.exp.(diagview(D))
is_buildkite = get(ENV, "BUILDKITE", "false") == "true"

if !is_buildkite
GenericFloats = (BigFloat, Complex{BigFloat})

@testset "exponential! for T = $T" for T in GenericFloats
rng = StableRNG(123)
m = 54

A = project_hermitian!(randn(rng, T, m, m))
D, V = @constinferred eigh_full(A)
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expA = @constinferred exponential!(copy(A); alg)
expA2 = @constinferred exponential(A; alg)
@test expA2 ≈ expA

Dexp, Vexp = @constinferred eigh_full(expA)
@test diagview(Dexp) ≈ LinearAlgebra.exp.(diagview(D))
end
end
end

using GenericSchur
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
rng = StableRNG(123)
m = 54
A = project_hermitian!(randn(rng, T1, m, m))
τ = randn(rng, T2)
using GenericSchur
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
rng = StableRNG(123)
m = 54
A = project_hermitian!(randn(rng, T1, m, m))
τ = randn(rng, T2)

D, V = @constinferred eigh_full(A)
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expτA = @constinferred exponential!((τ, copy(A)); alg)
expτA2 = @constinferred exponential((τ, A); alg)
@test expτA2 ≈ expτA
D, V = @constinferred eigh_full(A)
algs = (MatrixFunctionViaEigh(GLA_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expτA = @constinferred exponential!((τ, copy(A)); alg)
expτA2 = @constinferred exponential((τ, A); alg)
@test expτA2 ≈ expτA

Dexp, Vexp = @constinferred eig_full(expτA)
Dexp, Vexp = @constinferred eig_full(expτA)

@test sort(diagview(Dexp); by = real) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = real)
@test sort(diagview(Dexp); by = real) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = real)
end
end
end
68 changes: 36 additions & 32 deletions test/genericschur/exponential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,46 @@ using MatrixAlgebraKit: diagview
using LinearAlgebra
using GenericSchur

GenericFloats = (BigFloat, Complex{BigFloat})

@testset "exponential! for T = $T" for T in GenericFloats
rng = StableRNG(123)
m = 54

A = randn(rng, T, m, m)
D, V = @constinferred eig_full(A)
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
expA_LA = @constinferred exponential(A)
@testset "algorithm $alg" for alg in algs
expA = @constinferred exponential!(copy(A))
expA2 = @constinferred exponential(A; alg = alg)
@test expA ≈ expA_LA
@test expA2 ≈ expA

Dexp, Vexp = @constinferred eig_full(expA)
@test sort(diagview(Dexp); by = imag) ≈ sort(LinearAlgebra.exp.(diagview(D)); by = imag)
is_buildkite = get(ENV, "BUILDKITE", "false") == "true"

if !is_buildkite
GenericFloats = (BigFloat, Complex{BigFloat})

@testset "exponential! for T = $T" for T in GenericFloats
rng = StableRNG(123)
m = 54

A = randn(rng, T, m, m)
D, V = @constinferred eig_full(A)
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
expA_LA = @constinferred exponential(A)
@testset "algorithm $alg" for alg in algs
expA = @constinferred exponential!(copy(A))
expA2 = @constinferred exponential(A; alg = alg)
@test expA ≈ expA_LA
@test expA2 ≈ expA

Dexp, Vexp = @constinferred eig_full(expA)
@test sort(diagview(Dexp); by = imag) ≈ sort(LinearAlgebra.exp.(diagview(D)); by = imag)
end
end
end

@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
rng = StableRNG(123)
m = 54
@testset "exponential! for T1 = $T1, T2 = $T2" for T1 in GenericFloats, T2 in GenericFloats
rng = StableRNG(123)
m = 54

A = randn(rng, T1, m, m)
τ = randn(rng, T2)
A = randn(rng, T1, m, m)
τ = randn(rng, T2)

D, V = @constinferred eig_full(A)
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expτA = @constinferred exponential!((τ, copy(A)))
expτA2 = @constinferred exponential((τ, A); alg)
@test expτA2 ≈ expτA
D, V = @constinferred eig_full(A)
algs = (MatrixFunctionViaEig(GS_QRIteration()),)
@testset "algorithm $alg" for alg in algs
expτA = @constinferred exponential!((τ, copy(A)))
expτA2 = @constinferred exponential((τ, A); alg)
@test expτA2 ≈ expτA

Dexp, Vexp = @constinferred eig_full(expτA)
@test sort(diagview(Dexp); by = x -> (imag(x), real(x))) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = x -> (imag(x), real(x)))
Dexp, Vexp = @constinferred eig_full(expτA)
@test sort(diagview(Dexp); by = x -> (imag(x), real(x))) ≈ sort(LinearAlgebra.exp.(diagview(D) .* τ); by = x -> (imag(x), real(x)))
end
end
end
Loading