We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using Cthulhu, Tapir # Specify function + args. fargs = (Base._mapreduce_dim, Base.Fix1(view, [5.0, 4.0]), vcat, Float64[], [1:1, 2:2], :) tt = typeof(fargs) # Construct the relevant interpreters. native_interp = Core.Compiler.NativeInterpreter(); cthulhu_interp = Cthulhu.CthulhuInterpreter(); tapir_interp = Tapir.TapirInterpreter(); # Both of these correctly infer the return type, Vector{Float64}. Base.code_typed_by_type(tt; optimize=true, interp=native_interp) Base.code_ircode_by_type(tt; optimize_until=nothing, interp=native_interp) # Inference fails. Base.code_typed_by_type(tt; optimize=true, interp=cthulhu_interp) Base.code_ircode_by_type(tt; optimize_until=nothing, interp=cthulhu_interp) # Inference fails. Base.code_typed_by_type(tt; optimize=true, interp=tapir_interp) Base.code_ircode_by_type(tt; optimize_until=nothing, interp=tapir_interp)
The same thing happens for Enzyme. For example, the code_ircode_by_type result for NativeInterpreter is
Enzyme
code_ircode_by_type
NativeInterpreter
julia> Base.code_ircode_by_type(tt; optimize_until=nothing, interp=native_interp) 1-element Vector{Any}: 362 1 ─ %1 = %new(Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}}, _2, $(QuoteNode(Base.BottomRF{typeof(vcat)}(vcat))))::Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}} │ %2 = invoke Base._foldl_impl(%1::Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}}, _4::Vector{Float64}, _5::Vector{UnitRange{Int64}})::Vector{Float64} └── return %2 │ => Vector{Float64}
while the result for TapirInterpreter is
TapirInterpreter
julia> Base.code_ircode_by_type(tt; optimize_until=nothing, interp=tapir_interp) 1-element Vector{Any}: 362 1 ─ %1 = %new(Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}}, _2, $(QuoteNode(Base.BottomRF{typeof(vcat)}(vcat))))::Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}} │ %2 = invoke Base.foldl_impl(%1::Base.MappingRF{Base.Fix1{typeof(view), Vector{Float64}}, Base.BottomRF{typeof(vcat)}}, _4::Vector{Float64}, _5::Vector{UnitRange{Int64}})::AbstractVector └── return %2 │ => AbstractVector
julia> versioninfo() Julia Version 1.10.5 Commit 6f3fdf7b362 (2024-08-27 14:19 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: macOS (x86_64-apple-darwin22.4.0) CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, skylake) Threads: 6 default, 0 interactive, 3 GC (on 12 virtual cores) Environment: JULIA_NUM_THREADS = 6 julia> Pkg.status() Status `/private/var/folders/z7/0fkyw8ms795b7znc_3vbvrsw0000gn/T/jl_9hQ5av/Project.toml` [f68482b8] Cthulhu v2.14.0 [07d77754] Tapir v0.2.42
The text was updated successfully, but these errors were encountered:
It might take a while before the Julia compiler team fixes this; can we work around it?
Sorry, something went wrong.
willtebbutt
No branches or pull requests
The same thing happens for
Enzyme
. For example, thecode_ircode_by_type
result forNativeInterpreter
iswhile the result for
TapirInterpreter
isThe text was updated successfully, but these errors were encountered: