Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test to avoid #53054 regressions #53079

Merged
merged 13 commits into from
Jan 30, 2024
Merged
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
13 changes: 13 additions & 0 deletions stdlib/LinearAlgebra/test/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ Random.seed!(100)
a[begin] = elty(NaN)
@test BLAS.nrm2(a) === abs2(elty(NaN))
end
@testset "deterministic mul!" begin
# mul! should be deterministic, see #53054
function tester_53054()
C = ComplexF32
mat = zeros(C, 1, 1)
for _ in 1:100
v = [C(1-0.2im) C(2+0.3im)]
mul!(mat, v, v', C(1+im), 1)
end
return mat
end
@test allequal(tester_53054() for _ in 1:10000)
end
@testset "scal" begin
α = rand(elty)
a = rand(elty,n)
Expand Down