JuliaSIMD / JuliaSIMD/LoopVectorization.jl

KeyError: key NumType not found

Đang mở
#46 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
789
Fork
73
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

This is a powerful and welcome tool. I would like to apply it to more packages. I have run into a limitation on supported types that seems more narrow than necessary.

running e.g. `myselfdotavx(xs::T)` where T is a Float64 compatible primitive type (or most other numeric bitstype, including Int64 compatibles) except for T = Union{Float64, Float32, Int64, Int32} results in a `KeyError`.
```
ERROR: KeyError: key XFloat32 not found
Stacktrace:
[1] getindex at .\dict.jl:477 [inlined]
[2] llvmtype(::Type{T} where T) at C:\Users\jas\.julia\packages\VectorizationBase\rPD9W\src\vectorizable.jl:22
[3] #s13#2(::Any, ::Any, ::Any, ::Any) at C:\Users\jas\.julia\packages\VectorizationBase\rPD9W\src\VectorizationBase.jl:50
[4] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at .\boot.jl:526
[5] vzero at C:\Users\jas\.julia\packages\VectorizationBase\rPD9W\src\VectorizationBase.jl:74 [inlined]
[6] macro expansion at C:\Users\jas\.julia\packages\LoopVectorization\8wcli\src\reconstruct_loopset.jl:248 [inlined]
[7] _avx_! at C:\Users\jas\.julia\packages\LoopVectorization\8wcli\src\reconstruct_loopset.jl:248 [inlined]
[8] myselfdotavx(::Array{XFloat32,1}) at .\REPL[39]:3
[9] ##core#495() at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:297
[10] ##sample#496(::BenchmarkTools.Parameters) at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:303
[11] _run(::BenchmarkTools.Benchmark{Symbol("##benchmark#494")}, ::BenchmarkTools.Parameters; verbose::Bool, pad::String, kwargs::Base.Iterators.Pairs{Symbol,Integer,NTuple{4,Symbol},NamedTuple{(:samples, :evals, :gctrial, :gcsample),Tuple{Int64,Int64,Bool,Bool}}}) at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:331
[12] (::Base.var"#inner#2"{Base.Iterators.Pairs{Symbol,Integer,NTuple{5,Symbol},NamedTuple{(:verbose, :samples, :evals, :gctrial, :gcsample),Tuple{Bool,Int64,Int64,Bool,Bool}}},typeof(BenchmarkTools._run),Tuple{BenchmarkTools.Benchmark{Symbol("##benchmark#494")},BenchmarkTools.Parameters}})() at .\essentials.jl:715
[13] #invokelatest#1 at .\essentials.jl:716 [inlined]
[14] #run_result#37 at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:32 [inlined]
[15] run(::BenchmarkTools.Benchmark{Symbol("##benchmark#494")}, ::BenchmarkTools.Parameters; kwargs::Base.Iterators.Pairs{Symbol,Integer,NTuple{5,Symbol},NamedTuple{(:verbose, :samples, :evals, :gctrial, :gcsample),Tuple{Bool,Int64,Int64,Bool,Bool}}}) at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:46
[16] #warmup#42 at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:79 [inlined]
[17] warmup(::BenchmarkTools.Benchmark{Symbol("##benchmark#494")}) at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:79
[18] top-level scope at C:\Users\jas\.julia\packages\BenchmarkTools\7aqwe\src\execution.jl:390
```
or Using Int128 results in
```
ERROR: error compiling myselfdotavx: Failed to parse LLVM Assembly:
julia: llvmcall:3:5: error: value doesn't match function result type '[2 x i128]'
ret <2 x i128> zeroinitializer
^
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các ví dụ tương thích với Float32 và Int128, sau đó kiểm tra các điểm vào của stack trace trong vectorizable.jl, VectorizationBase.jl và reconstruct_loopset.jl. Theo dõi cách các kiểu số đi tới llvmtype và lời gọi LLVM được sinh ra; hoàn tất khi các kiểu được báo cáo không còn tạo ra KeyError hoặc LLVM parse error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
julia
Lĩnh vực
compilers, performance
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.