Skip to content

changed mul_heuristic for non-float #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/matrix_multiply.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,9 @@ end

@generated function _mul(Sa::Size{sa}, Sb::Size{sb}, a::StaticMatrix{<:Any, <:Any, Ta}, b::StaticMatrix{<:Any, <:Any, Tb}) where {sa, sb, Ta, Tb}
# Heuristic choice for amount of codegen
if sa[1]*sa[2]*sb[2] <= 8*8*8
return quote
@_inline_meta
return mul_unrolled(Sa, Sb, a, b)
end
elseif sa[1] <= 14 && sa[2] <= 14 && sb[2] <= 14
return quote
@_inline_meta
return mul_unrolled_chunks(Sa, Sb, a, b)
end
else
return quote
@_inline_meta
return mul_loop(Sa, Sb, a, b)
end
return quote
@_inline_meta
return mul_loop(Sa, Sb, a, b)
end
end

Expand Down