Skip to content

Commit

Permalink
don't test westmere orders
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed May 3, 2024
1 parent c948864 commit d4c450c
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions test/gemm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Unum, Tnum = LoopVectorization.register_count() == 16 ? (2, 6) : (4, 6)
end
Unumt, Tnumt = LoopVectorization.register_count() == 16 ? (2, 6) : (5, 5)
if LoopVectorization.register_count() != 8
if (LoopVectorization.register_count() != 8) && ((LoopVectorization.pick_vector_width(Float64) != 2) ||(LoopVectorization.register_count() != 16))
@test @inferred(LoopVectorization.matmul_params()) == (Unum, Tnum)
end

Expand All @@ -30,7 +30,7 @@
end
)
lsAmulBt1 = LoopVectorization.loopset(AmulBtq1)
if LoopVectorization.register_count() != 8
if (LoopVectorization.register_count() != 8) && ((LoopVectorization.pick_vector_width(Float64) != 2) ||(LoopVectorization.register_count() != 16))
@test LoopVectorization.choose_order(lsAmulBt1) ==
(Symbol[:n, :m, :k], :m, :n, :m, Unum, Tnum)
end
Expand All @@ -43,7 +43,7 @@
end
)
lsAmulB1 = LoopVectorization.loopset(AmulBq1)
if LoopVectorization.register_count() != 8
if (LoopVectorization.register_count() != 8) && ((LoopVectorization.pick_vector_width(Float64) != 2) ||(LoopVectorization.register_count() != 16))
@test LoopVectorization.choose_order(lsAmulB1) ==
(Symbol[:n, :m, :k], :m, :n, :m, Unum, Tnum)
end
Expand All @@ -56,7 +56,7 @@
end
)
lsAmulB2 = LoopVectorization.loopset(AmulBq2)
if LoopVectorization.register_count() != 8
if (LoopVectorization.register_count() != 8) && ((LoopVectorization.pick_vector_width(Float64) != 2) ||(LoopVectorization.register_count() != 16))
@test LoopVectorization.choose_order(lsAmulB2) ==
(Symbol[:n, :m, :k], :m, :n, :m, Unum, Tnum)
end
Expand All @@ -70,11 +70,9 @@
end
)
lsAmulB3 = LoopVectorization.loopset(AmulBq3)
if LoopVectorization.register_count() != 8
if (LoopVectorization.register_count() != 8) && ((LoopVectorization.pick_vector_width(Float64) != 2) ||(LoopVectorization.register_count() != 16))
@test LoopVectorization.choose_order(lsAmulB3) ==
(Symbol[:n, :m, :k], :m, :n, :m, Unum, Tnum)
end
if LoopVectorization.register_count() != 8
for (fA, fB, v, Un, Tn) [
(identity, identity, :m, Unum, Tnum),
(adjoint, identity, :k, Unumt, Tnumt),
Expand Down Expand Up @@ -178,8 +176,13 @@
)
lsAmuladd = LoopVectorization.loopset(Amuladdq)
if LoopVectorization.register_count() != 8
if LoopVectorization.pick_vector_width(Float64) != 2
@test LoopVectorization.choose_order(lsAmuladd) ==
(Symbol[:n, :m, :k], :m, :n, :m, Unum, Tnum)
else
@test LoopVectorization.choose_order(lsAmuladd) ==
(Symbol[:m, :n, :k], :n, :m, :m, Unum, Tnum)
end
end
Atmuladdq = :(
for m axes(A, 2), n axes(B, 2)
Expand Down Expand Up @@ -410,9 +413,13 @@
@test LoopVectorization.choose_order(lsr2amb) == ([:m, :n, :k], :m, :n, :m, 3, 7)
end
elseif LoopVectorization.register_count() == 16
if LoopVectorization.pick_vector_width(Float64) == 4
# @test LoopVectorization.choose_order(lsr2amb) == ([:m, :n, :k], :m, :n, :m, 1, 6)
# @test LoopVectorization.choose_order(lsr2amb) == ([:m, :n, :k], :m, :n, :m, 2, 4)
@test LoopVectorization.choose_order(lsr2amb) == ([:n, :m, :k], :n, :m, :m, 3, 3)
@test LoopVectorization.choose_order(lsr2amb) == ([:n, :m, :k], :n, :m, :m, 3, 3)
elseif LoopVectorization.pick_vector_width(Float64) == 2
@test LoopVectorization.choose_order(lsr2amb) == ([:m, :n, :k], :n, :m, :m, 3, 3)
end
end
function rank2AmulBavx!(C, Aₘ, Aₖ, B)
@turbo for m axes(C, 1), n axes(C, 2)
Expand Down

0 comments on commit d4c450c

Please sign in to comment.