Skip to content

Commit fb214dc

Browse files
committed
Turn on precompiles again.
1 parent 04d2504 commit fb214dc

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

src/LoopVectorization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ loop-reordering so as to improve performance:
105105
"""
106106
LoopVectorization
107107

108-
# include("precompile.jl")
109-
# _precompile_()
108+
include("precompile.jl")
109+
_precompile_()
110110

111111
# import ChainRulesCore, ForwardDiff
112112
# include("vmap_grad.jl")

src/precompile.jl

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
function _precompile_()
22
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
33

4-
Base.precompile(Tuple{typeof(LoopVectorization._avx_loopset),Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Any})
5-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{Adjoint{Float64, Matrix{Float64}}},Int64})
6-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{LowDimArray{(false,), Float32, 3, Array{Float32, 3}}},Int64})
7-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Float32, 2, Array{Float32, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
8-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
9-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Int32, 2, Array{Int32, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
10-
Base.precompile(Tuple{typeof(LoopVectorization.add_broadcast!),LoopVectorization.LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Int64, 2, Array{Int64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
11-
Base.precompile(Tuple{typeof(LoopVectorization.add_compute!),LoopVectorization.LoopSet,Symbol,Expr,Int64,Int64,Nothing})
12-
Base.precompile(Tuple{typeof(LoopVectorization.add_constant!),LoopVectorization.LoopSet,Float64,Vector{Symbol},Symbol,Int64})
13-
Base.precompile(Tuple{typeof(LoopVectorization.add_if!),LoopVectorization.LoopSet,Symbol,Expr,Int64,Int64,LoopVectorization.ArrayReferenceMetaPosition})
14-
Base.precompile(Tuple{typeof(avx_body), LoopSet, Tuple{Int8,Int8,Int8,Int,Int,Int,Int}})
15-
Base.precompile(Tuple{typeof(avx_loopset), Vector{Instruction}, Vector{OperationStruct}, Vector{ArrayRefStruct}, Vector{Any}, Vector{Any}, Core.SimpleVector, Any})
16-
17-
Base.precompile(Tuple{typeof(LoopVectorization.cost_vec_buf),LoopVectorization.LoopSet})
18-
Base.precompile(Tuple{typeof(LoopVectorization.evaluate_cost_tile),LoopVectorization.LoopSet,Vector{Symbol},LoopVectorization.UnrollSymbols})
19-
Base.precompile(Tuple{typeof(LoopVectorization.pushop!),LoopVectorization.LoopSet,LoopVectorization.Operation,Symbol})
20-
Base.precompile(Tuple{typeof(LoopVectorization.recursive_muladd_search!),Expr,Vector{Any},Bool,Bool})
21-
Base.precompile(Tuple{typeof(LoopVectorization.solve_unroll),SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true},SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true},Float64,Float64,Int64,Int64})
22-
Base.precompile(Tuple{typeof(LoopVectorization.stride_penalty),LoopVectorization.LoopSet,Vector{Symbol}})
23-
Base.precompile(Tuple{typeof(LoopVectorization.substitute_broadcast),Expr,Symbol})
24-
Base.precompile(Tuple{typeof(println),IOBuffer,Vector{LoopVectorization.Operation}})
25-
Base.precompile(Tuple{typeof(show),IOBuffer,Tuple{Int64, LoopVectorization.NumberType}})
4+
Base.precompile(Tuple{Type{ArrayRefStruct},LoopSet,ArrayReferenceMeta,Vector{Symbol},Vector{Int64}})
5+
Base.precompile(Tuple{typeof(_avx_loopset),Any,Any,Any,Any,Core.SimpleVector,Core.SimpleVector,Tuple{Bool, Int8, Int8, Int64, Int64, Int64, Int64, Int64, Int64, Int64, UInt64}})
6+
Base.precompile(Tuple{typeof(add_broadcast!),LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Float32, 2, Array{Float32, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
7+
Base.precompile(Tuple{typeof(add_broadcast!),LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
8+
Base.precompile(Tuple{typeof(add_broadcast!),LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Int32, 2, Array{Int32, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
9+
Base.precompile(Tuple{typeof(add_broadcast!),LoopSet,Symbol,Symbol,Vector{Symbol},Type{SubArray{Int64, 2, Array{Int64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}},Int64})
10+
Base.precompile(Tuple{typeof(add_broadcast!),LoopSet,Symbol,Symbol,Vector{Symbol},Type{Vector{Float64}},Int64})
11+
Base.precompile(Tuple{typeof(add_compute!),LoopSet,Symbol,Expr,Int64,Int64,ArrayReferenceMetaPosition})
12+
Base.precompile(Tuple{typeof(add_compute!),LoopSet,Symbol,Expr,Int64,Int64,Nothing})
13+
Base.precompile(Tuple{typeof(add_constant!),LoopSet,ArrayReferenceMetaPosition,Int64})
14+
Base.precompile(Tuple{typeof(add_constant!),LoopSet,Float64,Vector{Symbol},Symbol,Int64})
15+
Base.precompile(Tuple{typeof(add_grouped_strided_pointer!),Expr,LoopSet})
16+
Base.precompile(Tuple{typeof(avx_macro),Module,LineNumberNode,Expr})
17+
Base.precompile(Tuple{typeof(check_args),SubArray{Float64, 1, Vector{Float64}, Tuple{Vector{Int64}}, false}})
18+
Base.precompile(Tuple{typeof(check_args),Vector{Char}})
19+
Base.precompile(Tuple{typeof(checkforoffset!),LoopSet,Symbol,Int64,Vector{Operation},Vector{Symbol},Vector{Int8},Vector{Int8},Vector{Bool},Vector{Symbol},Vector{Symbol},Expr})
20+
Base.precompile(Tuple{typeof(gesp_const_offsets!),LoopSet,Symbol,Int64,Vector{Symbol},Vector{Bool},Vector{Tuple{Int64, Symbol}}})
21+
Base.precompile(Tuple{typeof(mulexpr),SubArray{Any, 1, Vector{Any}, Tuple{UnitRange{Int64}}, true}})
22+
Base.precompile(Tuple{typeof(push!),LoopSet,Expr,Int64,Int64})
23+
Base.precompile(Tuple{typeof(pushop!),LoopSet,Operation,Symbol})
24+
Base.precompile(Tuple{typeof(recursive_muladd_search!),Expr,Vector{Any},Nothing,Bool,Bool})
25+
Base.precompile(Tuple{typeof(substitute_broadcast),Expr,Symbol,Bool,Int8,Int8,Int64})
2626
end

src/reconstruct_loopset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function create_mrefs!(
252252
end
253253
function create_mrefs!(
254254
ls::LoopSet, arf::Vector{ArrayRefStruct}, as::Vector{Symbol}, os::Vector{Symbol},
255-
nopsv::Vector{NOpsType}, expanded::Vector{Bool}, ::Type{VectorizationBase.GroupedStridedPointers{P,C,B,R,I,X,O}}
255+
nopsv::Vector{NOpsType}, expanded::Vector{Bool}, @nospecialize(_::Type{VectorizationBase.GroupedStridedPointers{P,C,B,R,I,X,O}})
256256
) where {P,C,B,R,I,X,O}
257257
mrefs = Vector{ArrayReferenceMeta}(undef, length(arf))
258258
sptrs = Expr(:tuple)

test/threading.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ end
9898
@testset "Threading" begin
9999
dcd = DenseConvDims{2,(5,5),3,6}()
100100
kern4 = rand(Float32, 5, 5, 3, 6);
101+
for M 17:50:267
102+
img = rand(Float32, M, M, 3, 100);
103+
outimage1 = Array{Float32}(undef, size(img,1)+1-size(kern4,1), size(img,2)+1-size(kern4,2), size(kern4,4), size(img,4));
104+
outimage2 = similar(outimage1);
105+
106+
convlayer!(outimage1, img, kern4, dcd);
107+
convlayer_direct!(outimage2, img, kern4, dcd);
108+
@test outimage1 outimage2
109+
end
110+
101111
for M 17:399
102112
# @show M
103113
K = M; N = M;
@@ -116,16 +126,6 @@ end
116126
out1 = OffsetArray(randn(size(A) .- 2), 1, 1)
117127
out2 = similar(out1);
118128
@test conv!(out1, A, kern) conv_baseline!(out2, A, kern)
119-
120-
121-
img = rand(Float32, M, M, 3, 100);
122-
out1 = Array{Float32}(undef, size(img,1)+1-size(kern4,1), size(img,2)+1-size(kern4,2), size(kern4,4), size(img,4));
123-
out2 = similar(out1);
124-
125-
convlayer!(out1, img, kern4, dcd);
126-
convlayer_direct!(out2, img, kern4, dcd);
127-
@test out1 out2
128-
129129
end
130130
end
131131

0 commit comments

Comments
 (0)