Skip to content
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

"this intrinsic must be compiled to be called" #76

Open
droodman opened this issue Dec 8, 2021 · 4 comments
Open

"this intrinsic must be compiled to be called" #76

droodman opened this issue Dec 8, 2021 · 4 comments

Comments

@droodman
Copy link

droodman commented Dec 8, 2021

For a program using LoopVectorization, in VS Code with Julia extension 1.4.3, I get this when I start debug mode, referencing line 340 of stridedpointers.jl (@generated function $f(p1::Core.LLVMPtr{T,0}, p2::Core.LLVMPtr{T,0}) where {T})

Exception has occurred: ErrorException
this intrinsic must be compiled to be called

Stacktrace:
  [1] vle(p1::Core.LLVMPtr{Float64, 0}, p2::Core.LLVMPtr{Float64, 0})
    @ VectorizationBase C:\Users\drood\.julia\packages\VectorizationBase\OEl8L\src\strided_pointers\stridedpointers.jl:340
  [2] vle(p1::Ptr{Float32}, p2::Ptr{Float32}, sp::VectorizationBase.OffsetPrecalc{Float32, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{4}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}, LayoutPointers.StridedPointer{Float32, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{4}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, Tuple{Nothing, Tuple{Int64, Int64, Int64}}})
    @ VectorizationBase C:\Users\drood\.julia\packages\VectorizationBase\OEl8L\src\strided_pointers\stridedpointers.jl:346
  [3] _turbo_!(#unused#::Val{(false, 0, 0, 0, false, 8, 32, 15, 64, 32768, 262144, 16777216, 0x0000000000000001)}, #unused#::Val{(:LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000013, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0001, 0x01), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000032, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0002, 0x02), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0003, 0x03), :numericconstant, Symbol("###reduction##zero###17###"), LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.constant, 0x0004, 0x00), :LoopVectorization, :vfmadd_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000132, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000100020004, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0004, 0x00), :LoopVectorization, :reduced_add, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000050003, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0003, 0x00), :LoopVectorization, :setindex!, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000000006, 0x00000000000000000000000000000000, LoopVectorization.memstore, 0x0005, 0x03))}, #unused#::Val{(LoopVectorization.ArrayRefStruct{:B, Symbol("##vptr##_B")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000103, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101), LoopVectorization.ArrayRefStruct{:C, Symbol("##vptr##_C")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000302, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101), LoopVectorization.ArrayRefStruct{:A, Symbol("##vptr##_A")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000102, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101))}, #unused#::Val{(0, (), (), (), (), ((4, LoopVectorization.IntOrFloat),), ())}, #unused#::Val{(:i, :k, :j)}, #unused#::Val{Tuple{Tuple{CloseOpenIntervals.CloseOpen{Int64, Int64}, CloseOpenIntervals.CloseOpen{Int64, Int64}, CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}}, Tuple{LayoutPointers.GroupedStridedPointers{Tuple{Ptr{Float32}, Ptr{Float32}, Ptr{Float32}}, (1, 1, 1), (0, 0, 0), ((1, 2), (1, 2), (1, 2)), ((1, 2), (3, 4), (5, 6)), Tuple{Static.StaticInt{4}, Int64, Static.StaticInt{4}, Int64, Static.StaticInt{4}, Int64}, NTuple{6, Static.StaticInt{0}}}}}}, var#arguments#::Tuple{Int64, Int64, Int64, Int64, Int64, Ptr{Float32}, Ptr{Float32}, Ptr{Float32}, Int64, Int64, Int64})
    @ LoopVectorization C:\Users\drood\.julia\packages\LoopVectorization\kVenK\src\reconstruct_loopset.jl:713
  [4] _turbo_!(#unused#::Val{(false, 0, 0, 0, false, 8, 32, 15, 64, 32768, 262144, 16777216, 0x0000000000000007)}, #unused#::Val{(:LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000013, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0001, 0x01), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000032, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0002, 0x02), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0003, 0x03), :numericconstant, Symbol("###reduction##zero###17###"), LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.constant, 0x0004, 0x00), :LoopVectorization, :vfmadd_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000132, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000100020004, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0004, 0x00), :LoopVectorization, :reduced_add, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000050003, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0003, 0x00), :LoopVectorization, :setindex!, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000003, 0x00000000000000000000000000000000, 0x00000000000000000000000000000006, 0x00000000000000000000000000000000, LoopVectorization.memstore, 0x0005, 0x03))}, #unused#::Val{(LoopVectorization.ArrayRefStruct{:B, Symbol("##vptr##_B")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000103, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101), LoopVectorization.ArrayRefStruct{:C, Symbol("##vptr##_C")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000302, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101), LoopVectorization.ArrayRefStruct{:A, Symbol("##vptr##_A")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000102, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101))}, #unused#::Val{(0, (), (), (), (), ((4, LoopVectorization.IntOrFloat),), ())}, #unused#::Val{(:i, :k, :j)}, #unused#::Val{Tuple{Tuple{CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}, CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}, CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}}, Tuple{LayoutPointers.GroupedStridedPointers{Tuple{Ptr{Float32}, Ptr{Float32}, Ptr{Float32}}, (1, 1, 1), (0, 0, 0), ((1, 2), (1, 2), (1, 2)), ((1, 2), (3, 4), (5, 6)), Tuple{Static.StaticInt{4}, Int64, Static.StaticInt{4}, Int64, Static.StaticInt{4}, Int64}, NTuple{6, Static.StaticInt{0}}}}}}, var#arguments#::Tuple{Int64, Int64, Int64, Ptr{Float32}, Ptr{Float32}, Ptr{Float32}, Int64, Int64, Int64})
    @ LoopVectorization C:\Users\drood\.julia\packages\LoopVectorization\kVenK\src\codegen\lower_threads.jl:652

[stack trace continues, referencing my code]

Results from typing status in the package manager:

[31c24e10] Distributions v0.25.32
[bdcacae8] LoopVectorization v0.12.99
[a2af1166] SortingAlgorithms v1.0.1
[37e2e46d] LinearAlgebra
[de0858da] Printf
[9a3f8284] Random
@chriselrod
Copy link
Member

Do any llvmcalls work with the debugger / JuliaInterpreter?

@droodman
Copy link
Author

droodman commented Dec 8, 2021

I'm sorry I don't know enough about Julia to understand and answer this question. The program runs fine out of debug mode. (Or if I comment out the @tturbo reference in the function higher up in the call stack.) I'm happy to perform any tests I can understand, like a sample usage of llvmcall.

@EPGUniP
Copy link

EPGUniP commented May 6, 2022

Hi, @droodman I am currently stuck with the same error. Did you find a solution?
Thanks!

@droodman
Copy link
Author

droodman commented May 6, 2022

Not that I recall, sorry. I ended up reluctantly dropping @turbo from my project because it is intended for interactive use and @turbo was adding a lot to initial load time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants