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
5 changes: 4 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ GenericSchur = "0.5.6"
JET = "0.9, 0.10"
LinearAlgebra = "1"
Mooncake = "0.4.183"
ParallelTestRunner = "2"
Random = "1"
SafeTestsets = "0.1"
StableRNGs = "1"
Expand All @@ -48,6 +49,7 @@ ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Expand All @@ -57,4 +59,5 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Aqua", "JET", "SafeTestsets", "Test", "TestExtras", "ChainRulesCore",
"ChainRulesTestUtils", "Random", "StableRNGs", "Zygote", "CUDA", "AMDGPU", "GenericLinearAlgebra", "GenericSchur", "Mooncake"]
"ChainRulesTestUtils", "Random", "StableRNGs", "Zygote", "CUDA", "AMDGPU",
"GenericLinearAlgebra", "GenericSchur", "Mooncake", "ParallelTestRunner"]
7 changes: 7 additions & 0 deletions test/codequality.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using MatrixAlgebraKit

using Aqua
Aqua.test_all(MatrixAlgebraKit)

using JET
JET.test_package(MatrixAlgebraKit; target_defined_modules = true)
82 changes: 26 additions & 56 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,60 +1,30 @@
using SafeTestsets
using ParallelTestRunner
using MatrixAlgebraKit

is_buildkite = get(ENV, "BUILDKITE", "false") == "true"
# don't run all tests on GPU, only the GPU
# specific ones
if !is_buildkite
@safetestset "Algorithms" begin
include("algorithms.jl")
end
@safetestset "Truncate" begin
include("truncate.jl")
end
@safetestset "Generalized Eigenvalue Decomposition" begin
include("gen_eig.jl")
end
@safetestset "Mooncake" begin
include("mooncake.jl")
end
@safetestset "ChainRules" begin
include("chainrules.jl")
end
@safetestset "MatrixAlgebraKit.jl" begin
@safetestset "Code quality (Aqua.jl)" begin
using MatrixAlgebraKit
using Aqua
Aqua.test_all(MatrixAlgebraKit)
end
@safetestset "Code linting (JET.jl)" begin
using MatrixAlgebraKit
using JET
JET.test_package(MatrixAlgebraKit; target_defined_modules = true)
end
# Start with autodiscovered tests
testsuite = find_tests(@__DIR__)

# remove testsuite
filter!(!(startswith("testsuite") ∘ first), testsuite)

# remove utils
delete!(testsuite, "utilities")
delete!(testsuite, "ad_utils")

# Parse arguments
args = parse_args(ARGS)

if filter_tests!(testsuite, args)
# don't run all tests on GPU, only the GPU specific ones
is_buildkite = get(ENV, "BUILDKITE", "false") == "true"
if is_buildkite
delete!(testsuite, "algorithms")
delete!(testsuite, "truncate")
delete!(testsuite, "gen_eig")
delete!(testsuite, "mooncake")
delete!(testsuite, "chainrules")
delete!(testsuite, "codequality")
end
end

@safetestset "QR / LQ Decomposition" begin
include("qr.jl")
include("lq.jl")
end
@safetestset "Polar Decomposition" begin
include("polar.jl")
end
@safetestset "Projections" begin
include("projections.jl")
end
@safetestset "Schur Decomposition" begin
include("schur.jl")
end
@safetestset "General Eigenvalue Decomposition" begin
include("eig.jl")
end
@safetestset "Hermitian Eigenvalue Decomposition" begin
include("eigh.jl")
end
@safetestset "Image and Null Space" begin
include("orthnull.jl")
end
@safetestset "Singular Value Decomposition" begin
include("svd.jl")
end
runtests(MatrixAlgebraKit, args; testsuite)