Move kron and diagonal tests out of core linalg tests#663
Merged
christiangnrd merged 2 commits intomasterfrom Dec 3, 2025
Merged
Move kron and diagonal tests out of core linalg tests#663christiangnrd merged 2 commits intomasterfrom
kron and diagonal tests out of core linalg tests#663christiangnrd merged 2 commits intomasterfrom
Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/testsuite/linalg.jl b/test/testsuite/linalg.jl
index 17da632..794e6ab 100644
--- a/test/testsuite/linalg.jl
+++ b/test/testsuite/linalg.jl
@@ -299,7 +299,7 @@ end
@testsuite "linalg/diagonal" (AT, eltypes) -> begin
@testset "Array + Diagonal" begin
n = 128
- A = AT(rand(Float32, (n,n)))
+ A = AT(rand(Float32, (n, n)))
d = AT(rand(Float32, n))
D = Diagonal(d)
B = A + D
@@ -324,7 +324,7 @@ end
@test collect(cholesky(D).U) ≈ collect(cholesky(F).U)
@test collect(cholesky(D).L) ≈ collect(cholesky(F).L)
- d = AT([1f0, 2f0, -1f0, 0f0])
+ d = AT([1.0f0, 2.0f0, -1.0f0, 0.0f0])
D = Diagonal(d)
@test cholesky(D, check = false).info == 3
end
@@ -420,7 +420,7 @@ end
end
@testset "$f with diagonal $d" for f in (triu, triu!, tril, tril!),
- d in -2:2
+ d in -2:2
A = randn(Float32, 10, 10)
@test compare(f, AT, A, d)
diff --git a/test/testsuite/random.jl b/test/testsuite/random.jl
index 5e00682..15c5bbb 100644
--- a/test/testsuite/random.jl
+++ b/test/testsuite/random.jl
@@ -25,7 +25,7 @@
Random.seed!(rng, 1)
rand!(rng, B)
- @test Array(A) == Array(B) skip=SEEDING_BROKEN && (prod(d) > length(rng.state))
+ @test Array(A) == Array(B) skip = SEEDING_BROKEN && (prod(d) > length(rng.state))
if rng != cpu_rng
rand!(cpu_rng, A)
@@ -65,7 +65,7 @@
randn!(rng, A)
Random.seed!(rng, 1)
randn!(rng, B)
- @test Array(A) == Array(B) skip=SEEDING_BROKEN && (prod(d) > (2 * length(rng.state)))
+ @test Array(A) == Array(B) skip = SEEDING_BROKEN && (prod(d) > (2 * length(rng.state)))
if rng != cpu_rng
randn!(cpu_rng, A) |
kron and diagonal tests from core linalg testskron and diagonal tests out of core linalg tests
Member
Author
|
Also skips broken rand tests (#530) since they apparently sometimes succeed with OpenCL.jl |
maleadt
approved these changes
Dec 3, 2025
Member
maleadt
left a comment
There was a problem hiding this comment.
LGTM. Splitting up these testsets is definitely a good thing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivated by attempting to fix OpenCL.jl windows CI (JuliaGPU/OpenCL.jl#405), but the
linalg/coretestset allocates 2x more than any other testsuite, so I think splitting off the two most allocation-heavy testsets into their own testsuites is a good idea regardless.