Skip to content

Commit 932f844

Browse files
author
Michael Abbott
committed
use isapprox, etc
1 parent ff87776 commit 932f844

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/batchedmul.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,29 @@ function bmm_adjtest(a,b; adjA = false, adjB = false)
2323
end
2424

2525

26-
@testset "Batched Matrix Multiplication" for TB in [Float64, Float32]
26+
@testset "Batched Matrices: Float64 * $TB" for TB in [Float64, Float32]
2727

2828
A = randn(7,5,3)
2929
B = randn(TB, 5,7,3)
3030
C = randn(7,6,3)
3131

3232
@test batched_mul(A, B) == bmm_test(A, B)
3333
@test batched_mul(batched_transpose(A), batched_transpose(B)) == bmm_test(A, B; transA = true, transB = true)
34-
@test batched_mul(batched_transpose(A), C) == bmm_test(A, C; transA = true)
35-
@test batched_mul(A, batched_transpose(A)) == bmm_test(A, A; transB = true)
34+
@test batched_mul(batched_transpose(A), C) bmm_test(A, C; transA = true)
35+
@test batched_mul(A, batched_transpose(A)) bmm_test(A, A; transB = true)
3636

3737

3838
cA = randn(Complex{Float64}, 7,5,3)
3939
cB = randn(Complex{TB}, 5,7,3)
4040
cC = randn(Complex{Float64}, 7,6,3)
4141

4242
@test batched_mul(cA, cB) == bmm_adjtest(cA, cB)
43-
@test batched_mul(batched_adjoint(cA), batched_adjoint(cB)) == bmm_adjtest(cA, cB; adjA = true, adjB = true)
44-
@test batched_mul(batched_adjoint(cA), cC) == bmm_adjtest(cA, cC; adjA = true)
45-
@test batched_mul(cA, batched_adjoint(cA)) == bmm_adjtest(cA, cA; adjB = true)
43+
@test batched_mul(batched_adjoint(cA), batched_adjoint(cB)) bmm_adjtest(cA, cB; adjA = true, adjB = true)
44+
@test batched_mul(batched_adjoint(cA), cC) bmm_adjtest(cA, cC; adjA = true)
45+
@test batched_mul(cA, batched_adjoint(cA)) bmm_adjtest(cA, cA; adjB = true)
4646

47-
@test batched_transpose(batched_transpose(A)) == A
48-
@test batched_adjoint(batched_adjoint(cA)) == cA
47+
@test batched_transpose(batched_transpose(A)) === A
48+
@test batched_adjoint(batched_adjoint(cA)) === cA
4949

5050
TBi = TB==Float64 ? Int64 : Int32
5151
iA = rand(1:99, 7,5,3)

0 commit comments

Comments
 (0)