Skip to content

Commit be39207

Browse files
committed
Bump SIMDPirates dependency to fix #54. Additionally, remove maybeconvert. It will be better to handle conversions by method-based promotion until proper op-dependent typing is added.
1 parent 9b7557b commit be39207

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

Manifest.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4949

5050
[[SIMDPirates]]
5151
deps = ["VectorizationBase"]
52-
git-tree-sha1 = "42da6678fbe40c1a968a48da5bf76d15e3652ba1"
52+
git-tree-sha1 = "456a334075b92d1770fc7c37a9c6944681e44793"
5353
uuid = "21efa798-c60a-11e8-04d3-e1a92915a26a"
54-
version = "0.3.11"
54+
version = "0.3.12"
5555

5656
[[SLEEFPirates]]
5757
deps = ["Libdl", "SIMDPirates", "VectorizationBase"]
@@ -71,6 +71,6 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7171

7272
[[VectorizationBase]]
7373
deps = ["CpuId", "LinearAlgebra"]
74-
git-tree-sha1 = "47209cb34f04e6f6d4855e5011644ec111066f6f"
74+
git-tree-sha1 = "5d9f62daaa09921c07d5fd7b4a686e0842bfdb0a"
7575
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
76-
version = "0.2.7"
76+
version = "0.3.0"

Project.toml

Lines changed: 3 additions & 3 deletions
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.6.11"
4+
version = "0.6.12"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -12,9 +12,9 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
1212

1313
[compat]
1414
Parameters = "0"
15-
SIMDPirates = "0.3.11, 0.4, 0.5"
15+
SIMDPirates = "0.3.12, 0.4, 0.5"
1616
SLEEFPirates = "0.3.5, 0.4, 0.5"
17-
VectorizationBase = "0.2.7, 0.3, 0.4"
17+
VectorizationBase = "0.3, 0.4, 0.5"
1818
julia = "1.1"
1919

2020
[extras]

src/add_compute.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ function update_reduction_status!(parentvec::Vector{Operation}, deps::Vector{Sym
8686
end
8787
end
8888
end
89-
function add_compute!(ls::LoopSet, op::Operation)
90-
@assert iscompute(op)
91-
pushop!(ls, child, name(op))
92-
end
89+
# function add_compute!(ls::LoopSet, op::Operation)
90+
# @assert iscompute(op)
91+
# pushop!(ls, child, name(op))
92+
# end
9393
function isreductzero(op::Operation, ls::LoopSet, reduct_zero::Symbol)
9494
isconstant(op) || return false
9595
reduct_zero === op.instruction.mod && return true

src/costs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const REDUCTION_CLASS = Dict{Symbol,Float64}(
222222
:min => MIN
223223
)
224224
reduction_instruction_class(instr::Symbol) = get(REDUCTION_CLASS, instr, NaN)
225-
reduction_instruction_class(instr::Instruction) = get(REDUCTION_CLASS, instr.instr, NaN)
225+
reduction_instruction_class(instr::Instruction) = reduction_instruction_class(instr.instr)
226226
function reduction_to_single_vector(x::Float64)
227227
# x == 1.0 ? :evadd : x == 2.0 ? :evmul : x == 3.0 ? :vor : x == 4.0 ? :vand : x == 5.0 ? :max : x == 6.0 ? :min : throw("Reduction not found.")
228228
x == 1.0 ? :evadd : x == 2.0 ? :evmul : x == 5.0 ? :max : x == 6.0 ? :min : throw("Reduction not found.")

src/lower_constant.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function lower_constant!(
4141
mvar = variable_name(op, suffix)
4242
constsym = instruction.instr
4343
if vectorized loopdependencies(op) || vectorized reducedchildren(op) || vectorized reduceddependencies(op)
44-
call = Expr(:call, lv(:vbroadcast), W, Expr(:call, lv(:maybeconvert), typeT, constsym))
44+
# call = Expr(:call, lv(:vbroadcast), W, Expr(:call, lv(:maybeconvert), typeT, constsym))
45+
call = Expr(:call, lv(:vbroadcast), W, constsym)
4546
if unrolled loopdependencies(op) || unrolled reducedchildren(op) || unrolled reduceddependencies(op)
4647
for u 0:U-1
4748
push!(q.args, Expr(:(=), Symbol(mvar, u), call))
@@ -77,15 +78,16 @@ function setconstantop!(ls, op, val)
7778
nothing
7879
end
7980

80-
@inline maybeconvert(::Type{T}, s::Number) where {T} = convert(T, s)
81-
@inline maybeconvert(::Type{T}, s::T) where {T <: Number} = s
82-
@inline maybeconvert(::Type, s) = s
81+
# @inline maybeconvert(::Type{T}, s::Number) where {T} = convert(T, s)
82+
# @inline maybeconvert(::Type{T}, s::T) where {T <: Number} = s
83+
# @inline maybeconvert(::Type, s) = s
8384

8485

8586
function lower_licm_constants!(ls::LoopSet)
8687
ops = operations(ls)
8788
for (id, sym) ls.preamble_symsym
88-
setconstantop!(ls, ops[id], Expr(:call, lv(:maybeconvert), ls.T, sym))
89+
# setconstantop!(ls, ops[id], Expr(:call, lv(:maybeconvert), ls.T, sym))
90+
setconstantop!(ls, ops[id], sym)
8991
end
9092
for (id,intval) ls.preamble_symint
9193
setop!(ls, ops[id], Expr(:call, lv(:sizeequivalentint), ls.T, intval))

0 commit comments

Comments
 (0)