Skip to content

Commit 125a040

Browse files
committed
Revert "Clean up and extend coverage for matmul tests"
This reverts commit 84ba238.
1 parent 355b1d4 commit 125a040

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

src/testsuite/blas.jl

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
function test_blas(AT)
22
@testset "BLAS" begin
3-
@testset "matmul with element type $elty" for elty in (Float32, Float64, ComplexF32, ComplexF64)
4-
A = rand(elty, 5, 6)
5-
B = rand(elty, 6, 5)
6-
C = rand(elty, 5, 5)
7-
x = rand(elty, 5)
8-
y = rand(elty, 6)
9-
10-
@test compare(*, AT, A, y)
11-
@test compare(*, AT, transpose(A), x)
12-
@test compare(*, AT, adjoint(A), x)
13-
14-
@test compare(*, AT, A, B)
15-
@test compare(*, AT, transpose(A), C)
16-
@test compare(*, AT, C, transpose(B))
17-
@test compare(*, AT, transpose(A), transpose(B))
18-
@test compare(*, AT, adjoint(A), C)
19-
@test compare(*, AT, C, adjoint(B))
20-
@test compare(*, AT, adjoint(A), adjoint(B))
21-
@test compare(*, AT, transpose(A), adjoint(B))
22-
@test compare(*, AT, adjoint(A), transpose(B))
3+
@testset "matmul" begin
4+
@test compare(*, AT, rand(Float32, 5, 5), rand(Float32, 5, 5))
5+
@test compare(*, AT, rand(Float32, 5, 5), rand(Float32, 5))
6+
@test compare((a, b)-> a * transpose(b), AT, rand(Float32, 5, 5), rand(Float32, 5, 5))
7+
@test compare((c, a, b)-> mul!(c, a, transpose(b)), AT, rand(Float32, 10, 32), rand(Float32, 10, 60), rand(Float32, 32, 60))
8+
@test compare((a, b)-> transpose(a) * b, AT, rand(Float32, 5, 5), rand(Float32, 5, 5))
9+
@test compare((a, b)-> transpose(a) * transpose(b), AT, rand(Float32, 10, 15), rand(Float32, 1, 10))
10+
@test compare((a, b)-> transpose(a) * b, AT, rand(Float32, 10, 15), rand(Float32, 10))
11+
@test compare(mul!, AT, rand(Float32, 15), rand(Float32, 15, 10), rand(Float32, 10))
2312
end
2413

2514
for T in (ComplexF32, Float32)

0 commit comments

Comments
 (0)