Closed wsmoses closed 3 weeks ago
setup shenanigans:
z(x) = Base.unsafe_pointer_to_objref(Base.reinterpret(Ptr{Cvoid}, x))
@generated function make()
return quote
Base.@_inline_meta
$(Expr(:new, z(138254807239984), ones(10), 1.0, UnitRange{Int64}(1:3)))
end
end
m = make()
Enzyme.Compiler.runtime_mixed_call(Val((false,true)), Base.Threads.threading_run, Ref(m))
Enzyme.Compiler.enzyme_code_typed(Enzyme.Compiler.runtime_mixed_call, Const, Tuple{Const{Val{(false, true)}}, Const{typeof(Base.Threads.threading_run)}, Duplicated{Ref{typeof(m)}}})
fn = sprint() do io
Enzyme.Compiler.enzyme_code_llvm(io, Enzyme.Compiler.runtime_mixed_call, Const, Tuple{Const{Val{(false, true)}}, Const{typeof(Base.Threads.threading_run)}, Duplicated{Ref{typeof(m)}}})
end
fn = sprint() do io
Enzyme.Compiler.enzyme_code_llvm(io, Enzyme.Compiler.runtime_mixed_call, Const, Tuple{Const{Val{(false, true)}}, Duplicated{Ref{typeof(m)}}}; dump_module=true, run_enzyme=false)
end