Skip to content

Commit

Permalink
Set max tile-unroll to 4 as a heuristic.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Jan 1, 2020
1 parent fb7bf0e commit 090c173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/determinestrategy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ function solve_tilesize(
cost_vec::AbstractVector{Float64} = @view(ls.cost_vec[:,1]),
reg_pressure::AbstractVector{Int} = @view(ls.reg_pres[:,1])
)
maxT = isstaticloop(ls, tiled) ? looprangehint(ls, tiled) : 8#REGISTER_COUNT
maxU = isstaticloop(ls, unrolled) ? looprangehint(ls, unrolled) : 4#REGISTER_COUNT
maxT = isstaticloop(ls, tiled) ? looprangehint(ls, tiled) : 4#REGISTER_COUNT
maxU = isstaticloop(ls, unrolled) ? looprangehint(ls, unrolled) : 8#REGISTER_COUNT
solve_tilesize(cost_vec, reg_pressure, maxU, maxT)
end

Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gemmq = :(for i ∈ 1:size(A,1), j ∈ 1:size(B,2)
end)

lsgemm = LoopVectorization.LoopSet(gemmq);
U, T = LoopVectorization.VectorizationBase.REGISTER_COUNT == 16 ? (3,4) : (4, 6)
U, T = LoopVectorization.VectorizationBase.REGISTER_COUNT == 16 ? (3,4) : (6, 4)
@test LoopVectorization.choose_order(lsgemm) == (Symbol[:j,:i,:k], U, T)

function mygemm!(C, A, B)
Expand Down

2 comments on commit 090c173

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/7383

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 090c1736746746d8b106e7c4ee6e3576e5cfdb09
git push origin v0.1.1

Please sign in to comment.