Skip to content

Commit ef1f923

Browse files
committed
Ramp up threads less aggressively
1 parent 1d67f0d commit ef1f923

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/codegen/lower_threads.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ end
166166
# end
167167
if Sys.ARCH === :x86_64
168168
@inline function choose_num_threads(C::T, NT::UInt, x::Base.BitInteger) where {T<:Union{Float32,Float64}}
169-
_choose_num_threads(Base.mul_float_fast(T(C), T(0.05460264079015985)), NT, x)
169+
_choose_num_threads(Base.mul_float_fast(T(C), T(0.0225)), NT, x)
170170
end
171171
else
172172
@inline function choose_num_threads(C::T, NT::UInt, x::Base.BitInteger) where {T<:Union{Float32,Float64}}
173-
_choose_num_threads(Base.mul_float_fast(C, T(0.05460264079015985) * T(0.25)), NT, x)
173+
_choose_num_threads(Base.mul_float_fast(C, T(0.0225) * T(0.25)), NT, x)
174174
end
175175
end
176176
@inline function _choose_num_threads(C::T, NT::UInt, x::Base.BitInteger) where {T<:Union{Float32,Float64}}
@@ -339,7 +339,7 @@ function thread_one_loops_expr(
339339
UNROLL::Tuple{Bool,Int8,Int8,Bool,Int,Int,Int,Int,Int,Int,Int,UInt}, OPS::Expr, ARF::Expr, AM::Expr, LPSYM::Expr
340340
)
341341
looplen = looplengthprod(ls)
342-
c = 0.05460264079015985 * c / looplen
342+
c = 0.0225 * c / looplen
343343
if Sys.ARCH !== :x86_64
344344
c *= 0.25
345345
end
@@ -475,8 +475,7 @@ function thread_two_loops_expr(
475475
UNROLL::Tuple{Bool,Int8,Int8,Bool,Int,Int,Int,Int,Int,Int,Int,UInt}, OPS::Expr, ARF::Expr, AM::Expr, LPSYM::Expr
476476
)
477477
looplen = looplengthprod(ls)
478-
c = 0.05460264079015985 * c / looplen
479-
# @show c
478+
c = 0.0225 * c / looplen
480479
if Sys.ARCH !== :x86_64
481480
c *= 0.25
482481
end

0 commit comments

Comments
 (0)