Skip to content

Commit 80f7351

Browse files
committed
Require at least one loop to be fully unrolled to consider fully unrolling a static loop when doing convolution-like loops.
1 parent c369e7f commit 80f7351

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.9.7"
4+
version = "0.9.8"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/lowering.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,17 @@ end
263263
# )
264264
# end
265265

266+
function check_full_conv_kernel(ls, us, N)
267+
loop₁ = getloop(ls, names(ls)[us.u₁loopnum])
268+
(isstaticloop(loop₁) && length(loop₁) == us.u₁) && return true
269+
loop₂ = getloop(ls, names(ls)[us.u₂loopnum])
270+
(isstaticloop(loop₂) && length(loop₂) == us.u₂) && return true
271+
false
272+
end
266273
function allinteriorunrolled(ls::LoopSet, us::UnrollSpecification, N)
274+
if ls.loadelimination[]
275+
check_full_conv_kernal(ls, us, N) || return false
276+
end
267277
unroll_total = 1
268278
for n 1:N-1
269279
loop = getloop(ls, names(ls)[n])

0 commit comments

Comments
 (0)