|
1 | 1 | function test_blas(AT)
|
2 | 2 | @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)) |
23 | 12 | end
|
24 | 13 |
|
25 | 14 | for T in (ComplexF32, Float32)
|
|
0 commit comments