Skip to content

Commit 3b8b1df

Browse files
committed
Test update
1 parent 77bd400 commit 3b8b1df

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/modeling/determinestrategy.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,9 @@ function cost(ls::LoopSet, op::Operation, (u₁,u₂)::Tuple{Symbol,Symbol}, vlo
8383
if isload(op) & (length(loopdependencies(op)) > 1)# vmov(a/u)pd
8484
srt += 0.5reg_size(ls) / cache_lnsze(ls)
8585
end
86-
# srt += 0.3shifter # shifter == number of shuffles
87-
# sl += 0.3shifter
8886
srt += shifter # shifter == number of shuffles
8987
sl += shifter
90-
# shifter -= 1
91-
# offset = 0.5reg_size(ls) / cache_lnsze(ls)
92-
# r = 1 << shifter
93-
# srt = srt*r + offset
94-
# sl *= r
95-
# if shifter > 1 && (!(cannot_shuffle(op, u₁, u₂, contigind, indices)))
96-
# shifter -= 1
97-
# offset = 0.5reg_size(ls) / cache_lnsze(ls)
98-
# end
99-
# else
10088
end
101-
# @show srt, sl
102-
# @show shifter, offset, dont_shuffle
10389
elseif isload(op) & (length(loopdependencies(op)) > 1)# vmov(a/u)pd
10490
# penalize vectorized loads with more than 1 loopdep
10591
# heuristic; more than 1 loopdep means that many loads will not be aligned

test/gemm.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,9 @@
651651
@test LoopVectorization.choose_order(lsAtmulBt8) == ([:n, :m, :k], :m, :n, :m, 2, 8)
652652
end
653653
elseif LoopVectorization.register_count() == 16
654-
@test LoopVectorization.choose_order(lsAtmulBt8) == ([:n, :m, :k], :m, :n, :m, 2, 4)
655-
# @test LoopVectorization.choose_order(lsAtmulBt8) == ([:n, :m, :k], :n, :m, :n, 2, 4)
654+
# vectorizing `n` is better, as we unroll `m`, neaning `C` can use shuffle stores
655+
# as we don't unroll `k`, we can't use shuffle loads from `C`
656+
@test LoopVectorization.choose_order(lsAtmulBt8) == ([:n, :m, :k], :n, :m, :n, 2, 4)
656657
elseif LoopVectorization.register_count() == 8
657658
@test LoopVectorization.choose_order(lsAtmulBt8) == ([:n, :m, :k], :m, :n, :m, 1, 4)
658659
end

0 commit comments

Comments
 (0)