Skip to content

Commit b5aca04

Browse files
committed
Adjusted tiling heuristics.
1 parent 179cce8 commit b5aca04

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/determinestrategy.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ end
236236
function solve_tilesize(X, R, Umax, Tmax)
237237
first(R) == 0 && return -1,-1,Inf #solve_smalltilesize(X, R, Umax, Tmax)
238238
U, T, cost = solve_tilesize(X, R)
239+
T -= T & 1
240+
U = min(U, T)
239241
U_too_large = U > Umax
240242
T_too_large = T > Tmax
241243
if U_too_large
@@ -257,7 +259,7 @@ function solve_tilesize(
257259
cost_vec::AbstractVector{Float64} = @view(ls.cost_vec[:,1]),
258260
reg_pressure::AbstractVector{Int} = @view(ls.reg_pres[:,1])
259261
)
260-
maxT = 4
262+
maxT = 8
261263
maxU = 8
262264
if isstaticloop(ls, tiled)
263265
maxT = min(maxT, looprangehint(ls, tiled))
@@ -436,7 +438,8 @@ function choose_order(ls::LoopSet)
436438
end
437439
uorder, uvec, uc = choose_unroll_order(ls, tc)
438440
if num_loops(ls) > 1 && tc uc
439-
return torder, tvec, tU, tT
441+
return torder, tvec, min(tU, tT), tT
442+
# return torder, tvec, 4, 4#5, 5
440443
else
441444
return uorder, uvec, determine_unroll_factor(ls, uorder, first(uorder), uvec), -1
442445
end

0 commit comments

Comments
 (0)