Skip to content

Commit e909af2

Browse files
staticfloatdkarrasch
authored andcommitted
Before running any @allocations tests, run the workload
This ensures that our LazyLibrary code, (which makes one allocation) does not fail these tests. Some of these `@allocations` checks had already included warm-up code, this simply expands that to the rest that I could find.
1 parent 2ce3f73 commit e909af2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/matmul.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ end
325325
@test 0 == @allocations mul!(C, At, Bt)
326326
end
327327
# syrk/herk
328+
mul!(C, transpose(A), A)
329+
mul!(C, adjoint(A), A)
330+
mul!(C, A, transpose(A))
331+
mul!(C, A, adjoint(A))
328332
@test 0 == @allocations mul!(C, transpose(A), A)
329333
@test 0 == @allocations mul!(C, adjoint(A), A)
330334
@test 0 == @allocations mul!(C, A, transpose(A))
@@ -334,6 +338,7 @@ end
334338
Ac = complex(A)
335339
for t in (identity, adjoint, transpose)
336340
Bt = t(B)
341+
mul!(Cc, Ac, Bt)
337342
@test 0 == @allocations mul!(Cc, Ac, Bt)
338343
end
339344
end
@@ -356,6 +361,9 @@ end
356361
A = rand(-10:10, n, n)
357362
B = ones(Float64, n, n)
358363
C = zeros(Float64, n, n)
364+
mul!(C, A, B)
365+
mul!(C, A, transpose(B))
366+
mul!(C, adjoint(A), B)
359367
@test 0 == @allocations mul!(C, A, B)
360368
@test 0 == @allocations mul!(C, A, transpose(B))
361369
@test 0 == @allocations mul!(C, adjoint(A), B)

0 commit comments

Comments
 (0)