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

Forward over Reverse Hessian computation results in ERROR: TypeError: in typeassert, expected LLVM.LoadInst, got a value of type LLVM.CallInst #2305

Open
jbrea opened this issue Feb 14, 2025 · 0 comments

Comments

@jbrea
Copy link

jbrea commented Feb 14, 2025

using Lux, Enzyme, ComponentArrays, Random

function loss(model, θ, st, x, y)
    pred, _ = model(x, θ, st)
    MSELoss()(pred, y)
end
function grad(model, θ, dθ, st, x, y)
    Enzyme.autodiff_deferred(Enzyme.Reverse,
                             Const(loss),
                             Enzyme.Active,
                             Const(model),
                             Duplicated(θ, dθ),
                             Const(st), Const(x), Const(y))
    nothing
end
function hess(model, θ, st, x, y)
    vdθ = Tuple(zero(θ) for i in eachindex(θ))
    for i in eachindex(θ)
        vdθ[i][i] = 1
    end= zero(θ)
    vdbθ = Tuple(zero(θ) for i in eachindex(θ))
    Enzyme.autodiff(Enzyme.Forward,
                    grad,
                    Const(model),
                    Enzyme.BatchDuplicated(θ, vdθ),
                    Enzyme.BatchDuplicated(bθ, vdbθ),
                    Const(st), Const(x), Const(y))
    hcat(vdbθ...)
end

model = Chain(Dense(2 => 8, softplus),
              Dense(8 => 1))

ps, st = Lux.setup(Xoshiro(12), model) .|> f64

pc = ComponentArray(ps)

x = randn(2, 10^4)
y = randn(1, 10^4)


loss(model, pc, st, x, y)
dpc = zero(pc)
grad(model, pc, dpc, st, x, y)
julia> hess(model, pc, st, x, y)
ERROR: TypeError: in typeassert, expected LLVM.LoadInst, got a value of type LLVM.CallInst
Stacktrace:
  [1] check_ir!(job::GPUCompiler.CompilerJob, errors::Vector{…}, imported::Set{…}, f::LLVM.Function, deletedfns::Vector{…}, mod::LLVM.Module)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler/validation.jl:275
  [2] check_ir!(job::GPUCompiler.CompilerJob, errors::Vector{Tuple{String, Vector{…}, Any}}, mod::LLVM.Module)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler/validation.jl:212
  [3] check_ir
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler/validation.jl:181 [inlined]
  [4] codegen(output::Symbol, job::GPUCompiler.CompilerJob{…}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:3428
  [5] codegen
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:3353 [inlined]
  [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5410
  [7] _thunk
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5410 [inlined]
  [8] cached_compilation
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5462 [inlined]
  [9] thunkbase(mi::Core.MethodInstance, World::UInt64, FA::Type{…}, A::Type{…}, TT::Type, Mode::Enzyme.API.CDerivativeMode, width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, edges::Vector{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5573
 [10] thunk_generator(world::UInt64, source::LineNumberNode, FA::Type, A::Type, TT::Type, Mode::Enzyme.API.CDerivativeMode, Width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, self::Any, fakeworld::Any, fa::Type, a::Type, tt::Type, mode::Type, width::Type, modifiedbetween::Type, returnprimal::Type, shadowinit::Type, abi::Type, erriffuncwritten::Type, runtimeactivity::Type)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5758
 [11] autodiff(::ForwardMode{…}, ::Const{…}, ::Type{…}, ::Const{…}, ::BatchDuplicated{…}, ::BatchDuplicated{…}, ::Const{…}, ::Const{…}, ::Const{…})
    @ Enzyme ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:640
 [12] autodiff
    @ ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:544 [inlined]
 [13] autodiff
    @ ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:516 [inlined]
 [14] hess(model::Chain{…}, θ::ComponentVector{…}, st::@NamedTuple{}, x::Matrix{…}, y::Matrix{…})
    @ Main ./REPL[5]:8
 [15] top-level scope
    @ REPL[14]:1
Some type information was truncated. Use `show(err)` to see complete types.

(example) pkg> st
Status `~/example/Project.toml`
  [b0b7db55] ComponentArrays v0.15.24
  [7da242da] Enzyme v0.13.30
  [b2108857] Lux v1.7.0
  [37e2e46d] LinearAlgebra v1.11.0
  [9a3f8284] Random v1.11.0

julia> versioninfo()
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 PRO 5850U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)

If I use autodiff instead of autodiff_deferred in grad, I get the following error:

Instruction does not dominate all uses!
Instruction does not dominate all uses!
  %9 = call {}*** @julia.get_pgcstack()
  %3 = bitcast {}*** %9 to {}**
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia_gemm__45289({ { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(112) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Float@double, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer, [-1,40]:Integer, [-1,41]:Integer, [-1,42]:Integer, [-1,43]:Integer, [-1,44]:Integer, [-1,45]:Integer, [-1,46]:Integer, [-1,47]:Integer, [-1,48]:Integer, [-1,49]:Integer, [-1,50]:Integer, [-1,51]:Integer, [-1,52]:Integer, [-1,53]:Integer, [-1,54]:Integer, [-1,55]:Integer}" "enzymejl_parmtype"="133462757816656" "enzymejl_parmtype_ref"="1" %0, {} addrspace(10)* noundef nonnull readonly align 8 dereferenceable(32) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer}" "enzymejl_parmtype"="133464533019408" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* noundef nonnull readonly align 8 dereferenceable(32) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer}" "enzymejl_parmtype"="133464533019408" "enzymejl_parmtype_ref"="2" %2) unnamed_addr #70 !dbg !17050 {
top:
  %3 = call {}*** @julia.get_pgcstack() #72
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca i64, align 16
  %7 = alloca i64, align 16
  %8 = alloca i64, align 16
  %9 = alloca i64, align 16
  %10 = alloca i64, align 16
  %11 = alloca i64, align 16
  %12 = alloca i64, align 16
  %13 = alloca i64, align 16
  %ptls_field97 = getelementptr inbounds {}**, {}*** %3, i64 2
  %14 = bitcast {}*** %ptls_field97 to i64***
  %ptls_load9899 = load i64**, i64*** %14, align 8, !tbaa !186
  %15 = getelementptr inbounds i64*, i64** %ptls_load9899, i64 2
  %safepoint = load i64*, i64** %15, align 8, !tbaa !195
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #73, !dbg !17051
  fence syncscope("singlethread") seq_cst
  %16 = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 1, i64 0, !dbg !17052
  %17 = load i64, i64 addrspace(11)* %16, align 8, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %18 = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 1, i64 1, !dbg !17055
  %19 = load i64, i64 addrspace(11)* %18, align 8, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %20 = bitcast {} addrspace(10)* %1 to i8 addrspace(10)*, !dbg !17058
  %21 = addrspacecast i8 addrspace(10)* %20 to i8 addrspace(11)*, !dbg !17058
  %22 = getelementptr inbounds i8, i8 addrspace(11)* %21, i64 16, !dbg !17058
  %.sroa.03.0..sroa_cast = bitcast i8 addrspace(11)* %22 to i64 addrspace(11)*, !dbg !17058
  %.sroa.03.0.copyload = load i64, i64 addrspace(11)* %.sroa.03.0..sroa_cast, align 8, !dbg !17058, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, i8 addrspace(11)* %21, i64 24, !dbg !17058
  %.sroa.2.0..sroa_cast = bitcast i8 addrspace(11)* %.sroa.2.0..sroa_idx to i64 addrspace(11)*, !dbg !17058
  %.sroa.1.0.copyload2 = load i64, i64 addrspace(11)* %.sroa.2.0..sroa_cast, align 8, !dbg !17063, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %23 = icmp eq i64 %19, %.sroa.03.0.copyload, !dbg !17065
  br i1 %23, label %L71, label %L66.L289_crit_edge, !dbg !17067

L66.L289_crit_edge:                               ; preds = %top
  %24 = bitcast {} addrspace(10)* %2 to i8 addrspace(10)*
  %.phi.trans.insert90 = addrspacecast i8 addrspace(10)* %24 to i8 addrspace(11)*
  %.phi.trans.insert91 = getelementptr inbounds i8, i8 addrspace(11)* %.phi.trans.insert90, i64 16
  %.sroa.079.0..sroa_idx.phi.trans.insert = bitcast i8 addrspace(11)* %.phi.trans.insert91 to i64 addrspace(11)*
  %.sroa.079.0.copyload.pre = load i64, i64 addrspace(11)* %.sroa.079.0..sroa_idx.phi.trans.insert, align 8, !dbg !17068, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  br label %L289, !dbg !17067

L71:                                              ; preds = %top
  %25 = bitcast {} addrspace(10)* %2 to i8 addrspace(10)*, !dbg !17070
  %26 = addrspacecast i8 addrspace(10)* %25 to i8 addrspace(11)*, !dbg !17070
  %27 = getelementptr inbounds i8, i8 addrspace(11)* %26, i64 16, !dbg !17070
  %.sroa.076.0..sroa_idx = bitcast i8 addrspace(11)* %27 to i64 addrspace(11)*, !dbg !17070
  %.sroa.076.0.copyload = load i64, i64 addrspace(11)* %.sroa.076.0..sroa_idx, align 8, !dbg !17070, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %28 = icmp eq i64 %17, %.sroa.076.0.copyload, !dbg !17065
  br i1 %28, label %L77, label %L289, !dbg !17067

L77:                                              ; preds = %L71
  %.sroa.277.0..sroa_idx78 = getelementptr inbounds i8, i8 addrspace(11)* %26, i64 24, !dbg !17070
  %29 = bitcast i8 addrspace(11)* %.sroa.277.0..sroa_idx78 to i64 addrspace(11)*, !dbg !17070
  %.sroa.1.0.copyload = load i64, i64 addrspace(11)* %29, align 8, !dbg !17070, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %30 = icmp eq i64 %.sroa.1.0.copyload2, %.sroa.1.0.copyload, !dbg !17065
  br i1 %30, label %L103, label %L289, !dbg !17067

L103:                                             ; preds = %L77
  store i8 78, i8* %4, align 1, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %31 = bitcast i64* %13 to i8*
  %32 = bitcast i64* %12 to i8*
  %33 = bitcast i64* %11 to i8*
  %34 = bitcast i64* %10 to i8*
  %35 = bitcast i64* %9 to i8*
  %36 = bitcast i64* %8 to i8*
  %37 = bitcast i64* %7 to i8*
  %38 = bitcast i64* %6 to i8*
  store i8 78, i8* %5, align 1, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  store i64 %17, i64* %6, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  store i64 %.sroa.1.0.copyload2, i64* %7, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  store i64 %19, i64* %8, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %39 = bitcast i64* %9 to double*, !dbg !17071
  store double 1.000000e+00, double* %39, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %40 = call i64 @llvm.smax.i64(i64 %17, i64 1) #72, !dbg !17078
  store i64 %40, i64* %10, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %41 = bitcast {} addrspace(10)* %1 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !17080
  %42 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %41 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !17080
  %43 = bitcast {} addrspace(10)* %1 to i8* addrspace(10)*, !dbg !17080
  %44 = addrspacecast i8* addrspace(10)* %43 to i8* addrspace(11)*, !dbg !17080
  %45 = load i8*, i8* addrspace(11)* %44, align 8, !dbg !17080, !tbaa !342, !alias.scope !376, !noalias !558, !enzyme_type !332, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %46 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %42, i64 0, i32 1, !dbg !17080
  %47 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %46, align 8, !dbg !17080, !tbaa !342, !alias.scope !376, !noalias !558, !dereferenceable_or_null !614, !align !234, !enzyme_type !330, !enzymejl_source_type_Memory\7BFloat64\7D !0, !enzymejl_byref_MUT_REF !0
  %48 = call i64 @llvm.smax.i64(i64 %19, i64 1) #72, !dbg !17078
  store i64 %48, i64* %11, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %49 = bitcast i64* %12 to double*, !dbg !17071
  store double 1.000000e+00, double* %49, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %50 = bitcast {} addrspace(10)* %2 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !17080
  %51 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %50 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !17080
  %52 = bitcast {} addrspace(10)* %2 to i8* addrspace(10)*, !dbg !17080
  %53 = addrspacecast i8* addrspace(10)* %52 to i8* addrspace(11)*, !dbg !17080
  %54 = load i8*, i8* addrspace(11)* %53, align 8, !dbg !17080, !tbaa !342, !alias.scope !376, !noalias !558, !enzyme_type !332, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %55 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %51, i64 0, i32 1, !dbg !17080
  %56 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %55, align 8, !dbg !17080, !tbaa !342, !alias.scope !376, !noalias !558, !dereferenceable_or_null !614, !align !234, !enzyme_type !330, !enzymejl_source_type_Memory\7BFloat64\7D !0, !enzymejl_byref_MUT_REF !0
  store i64 %40, i64* %13, align 16, !dbg !17071, !tbaa !423, !alias.scope !314, !noalias !17075
  %57 = bitcast { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0 to { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)*, !dbg !17081
  %58 = load atomic { i8*, {} addrspace(10)* } addrspace(10)*, { i8*, {} addrspace(10)* } addrspace(10)* addrspace(11)* %57 unordered, align 8, !dbg !17081, !tbaa !195, !alias.scope !368, !noalias !482, !nonnull !0, !dereferenceable !233, !align !234, !enzyme_type !216, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BFloat64\7D !0
  %59 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %58 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !17083
  %60 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %59, i64 0, i32 0, !dbg !17083
  %61 = load i8*, i8* addrspace(11)* %60, align 8, !dbg !17083, !tbaa !342, !alias.scope !376, !noalias !558, !enzyme_type !332, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Ptr\7BFloat64\7D !0
  %62 = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 0, i32 2, !dbg !17085
  %63 = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 0, i32 3, !dbg !17085
  %64 = load i64, i64 addrspace(11)* %63, align 8, !dbg !17088, !tbaa !195, !alias.scope !368, !noalias !482, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %65 = load i64, i64 addrspace(11)* %62, align 8, !dbg !17089, !tbaa !195, !alias.scope !368, !noalias !482, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %66 = ptrtoint i8* %54 to i64, !dbg !17090
  %67 = ptrtoint i8* %45 to i64, !dbg !17090
  %68 = add i64 %65, %64, !dbg !17089
  %69 = shl i64 %68, 3, !dbg !17092
  %70 = add i64 %69, -8, !dbg !17092
  %71 = getelementptr i8, i8* %61, i64 %70, !dbg !17093
  %72 = ptrtoint i8* %71 to i64, !dbg !17093
  %73 = insertvalue { i8*, {} addrspace(10)* } zeroinitializer, i8* %54, 0, !dbg !17080
  %74 = insertvalue { i8*, {} addrspace(10)* } %73, {} addrspace(10)* %56, 1, !dbg !17080
  %75 = insertvalue { i8*, {} addrspace(10)* } zeroinitializer, i8* %45, 0, !dbg !17080
  %76 = insertvalue { i8*, {} addrspace(10)* } %75, {} addrspace(10)* %47, 1, !dbg !17080
  %77 = bitcast { i8*, {} addrspace(10)* } addrspace(10)* %58 to {} addrspace(10)*, !dbg !17074
  %78 = insertvalue { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 } poison, {} addrspace(10)* %77, 0, !dbg !17074
  %.unpack124.unpack.elt = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 0, i32 1, i64 0, i64 0, !dbg !17074
  %.unpack124.unpack.unpack = load i64, i64 addrspace(11)* %.unpack124.unpack.elt, align 8, !dbg !17074, !tbaa !195, !alias.scope !368, !noalias !482, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %79 = insertvalue [2 x i64] poison, i64 %.unpack124.unpack.unpack, 0, !dbg !17074
  %.unpack124.unpack.elt130 = getelementptr inbounds { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] }, { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* %0, i64 0, i32 0, i32 1, i64 0, i64 1, !dbg !17074
  %.unpack124.unpack.unpack131 = load i64, i64 addrspace(11)* %.unpack124.unpack.elt130, align 8, !dbg !17074, !tbaa !195, !alias.scope !368, !noalias !482, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %.unpack124.unpack132 = insertvalue [2 x i64] %79, i64 %.unpack124.unpack.unpack131, 1, !dbg !17074
  %.unpack124129 = insertvalue [1 x [2 x i64]] poison, [2 x i64] %.unpack124.unpack132, 0, !dbg !17074
  %80 = insertvalue { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 } %78, [1 x [2 x i64]] %.unpack124129, 1, !dbg !17074
  %81 = insertvalue { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 } %80, i64 %65, 2, !dbg !17074
  %82 = insertvalue { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 } %81, i64 %64, 3, !dbg !17074
  %83 = load atomic void (i8*, i8*, i8*, i8*, i8*, i8*, i64, i8*, i64, i8*, i8*, i64, i8*, i64, i64)*, void (i8*, i8*, i8*, i8*, i8*, i8*, i64, i8*, i64, i8*, i8*, i64, i8*, i64, i64)** bitcast (void ()** @jlplt_dgemm_64__45303_got to void (i8*, i8*, i8*, i8*, i8*, i8*, i64, i8*, i64, i8*, i8*, i64, i8*, i64, i64)**) unordered, align 8, !dbg !17074
  call void %83(i8* nonnull %4, i8* nonnull %5, i8* nonnull %38, i8* nonnull %37, i8* nonnull %36, i8* nonnull %35, i64 %72, i8* nonnull %34, i64 %67, i8* nonnull %33, i8* nonnull %32, i64 %66, i8* nonnull %31, i64 1, i64 1) #72 [ "jl_roots"({} addrspace(10)* null, { i8*, {} addrspace(10)* } %74, {} addrspace(10)* null, {} addrspace(10)* null, { i8*, {} addrspace(10)* } %76, {} addrspace(10)* null, { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 } %82, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null) ], !dbg !17074
  ret void, !dbg !17074

L289:                                             ; preds = %L77, %L71, %L66.L289_crit_edge
  %.sroa.079.0.copyload = phi i64 [ %.sroa.079.0.copyload.pre, %L66.L289_crit_edge ], [ %17, %L77 ], [ %.sroa.076.0.copyload, %L71 ], !dbg !17068, !enzyme_inactive !0
  %84 = bitcast {} addrspace(10)* %2 to i8 addrspace(10)*
  %.pre-phi1.pre-phi.pre-phi.pre-phi = addrspacecast i8 addrspace(10)* %84 to i8 addrspace(11)*
  %current_task196 = getelementptr inbounds {}**, {}*** %3, i64 -14
  %85 = bitcast {}*** %current_task196 to {}*
  %.sroa.280.0..sroa_idx81 = getelementptr i8, i8 addrspace(11)* %.pre-phi1.pre-phi.pre-phi.pre-phi, i64 24, !dbg !17068
  %86 = bitcast i8 addrspace(11)* %.sroa.280.0..sroa_idx81 to i64 addrspace(11)*, !dbg !17068
  %.sroa.280.0.copyload = load i64, i64 addrspace(11)* %86, align 8, !dbg !17068, !tbaa !283, !alias.scope !405, !noalias !17060, !enzyme_inactive !0, !enzyme_type !262, !enzymejl_source_type_Int64 !0, !enzymejl_byref_BITS_VALUE !0
  %87 = call noalias nonnull align 8 dereferenceable(16) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %85, i64 16, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464334631200 to {}*) to {} addrspace(10)*)) #74, !dbg !17095
  %88 = bitcast {} addrspace(10)* %87 to {} addrspace(10)* addrspace(10)*, !dbg !17095, !enzyme_inactive !0
  %89 = addrspacecast {} addrspace(10)* addrspace(10)* %88 to {} addrspace(10)* addrspace(11)*, !dbg !17095, !enzyme_inactive !0
  store {} addrspace(10)* null, {} addrspace(10)* addrspace(11)* %89, align 8, !dbg !17095, !tbaa !423, !alias.scope !314, !noalias !17075
  %90 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %89, i64 1, !dbg !17095
  store {} addrspace(10)* null, {} addrspace(10)* addrspace(11)* %90, align 8, !dbg !17095, !tbaa !423, !alias.scope !314, !noalias !17075
  %91 = call noalias nonnull align 8 dereferenceable(88) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Pointer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Pointer, [-1,40]:Integer, [-1,41]:Integer, [-1,42]:Integer, [-1,43]:Integer, [-1,44]:Integer, [-1,45]:Integer, [-1,46]:Integer, [-1,47]:Integer, [-1,48]:Pointer, [-1,56]:Integer, [-1,57]:Integer, [-1,58]:Integer, [-1,59]:Integer, [-1,60]:Integer, [-1,61]:Integer, [-1,62]:Integer, [-1,63]:Integer, [-1,64]:Pointer, [-1,72]:Integer, [-1,73]:Integer, [-1,74]:Integer, [-1,75]:Integer, [-1,76]:Integer, [-1,77]:Integer, [-1,78]:Integer, [-1,79]:Integer, [-1,80]:Integer, [-1,81]:Integer, [-1,82]:Integer, [-1,83]:Integer, [-1,84]:Integer, [-1,85]:Integer, [-1,86]:Integer, [-1,87]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %85, i64 88, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133462678651024 to {}*) to {} addrspace(10)*)) #74, !dbg !17095
  %92 = bitcast {} addrspace(10)* %91 to { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)*, !dbg !17095, !enzyme_inactive !0
  %.repack = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 0, !dbg !17095
  store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464436950080 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack103 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 1, !dbg !17095
  store i64 %17, i64 addrspace(10)* %.repack103, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack105 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 2, !dbg !17095
  store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464397513232 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack105, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack107 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 3, !dbg !17095
  store i64 %19, i64 addrspace(10)* %.repack107, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack109 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 4, !dbg !17095
  store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464436950048 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack109, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack111 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 5, !dbg !17095
  store i64 %.sroa.03.0.copyload, i64 addrspace(10)* %.repack111, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack113 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 6, !dbg !17095
  store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464397513232 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack113, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack115 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 7, !dbg !17095
  store i64 %.sroa.1.0.copyload2, i64 addrspace(10)* %.repack115, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack117 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 8, !dbg !17095
  store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464436950016 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack117, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack119.repack = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 9, i64 0, !dbg !17095
  store i64 %.sroa.079.0.copyload, i64 addrspace(10)* %.repack119.repack, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  %.repack119.repack121 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, [2 x i64] } addrspace(10)* %92, i64 0, i32 9, i64 1, !dbg !17095
  store i64 %.sroa.280.0.copyload, i64 addrspace(10)* %.repack119.repack121, align 8, !dbg !17095, !tbaa !310, !alias.scope !314, !noalias !17075
  store atomic {} addrspace(10)* %91, {} addrspace(10)* addrspace(11)* %89 release, align 8, !dbg !17095, !tbaa !423, !alias.scope !314, !noalias !17075
  call void ({} addrspace(10)*, ...) @julia.write_barrier({} addrspace(10)* nonnull %87, {} addrspace(10)* nonnull %91) #75, !dbg !17095
  %93 = bitcast {} addrspace(10)* %87 to i8 addrspace(10)*, !dbg !17095, !enzyme_inactive !0
  %94 = addrspacecast i8 addrspace(10)* %93 to i8 addrspace(11)*, !dbg !17095, !enzyme_inactive !0
  %95 = getelementptr inbounds i8, i8 addrspace(11)* %94, i64 8, !dbg !17095
  %96 = load {}*, {}** @jl_nothing, align 8, !dbg !17095, !tbaa !195, !alias.scope !368, !noalias !482, !nonnull !0, !enzyme_inactive !0, !enzyme_type !426, !enzymejl_byref_BITS_REF !0, !enzymejl_source_type_Nothing !0
  %97 = addrspacecast {}* %96 to {} addrspace(10)*, !dbg !17095, !enzyme_inactive !0
  %98 = bitcast i8 addrspace(11)* %95 to {} addrspace(10)* addrspace(11)*, !dbg !17095
  store atomic {} addrspace(10)* %97, {} addrspace(10)* addrspace(11)* %98 release, align 8, !dbg !17095, !tbaa !423, !alias.scope !314, !noalias !17075
  %99 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %85, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 133464339136352 to {}*) to {} addrspace(10)*)) #74, !dbg !17069
  %100 = bitcast {} addrspace(10)* %99 to [1 x {} addrspace(10)*] addrspace(10)*, !dbg !17069, !enzyme_inactive !0
  %101 = getelementptr [1 x {} addrspace(10)*], [1 x {} addrspace(10)*] addrspace(10)* %100, i64 0, i64 0, !dbg !17069
  store {} addrspace(10)* %87, {} addrspace(10)* addrspace(10)* %101, align 8, !dbg !17069, !tbaa !310, !alias.scope !314, !noalias !17075
  %102 = addrspacecast {} addrspace(10)* %99 to {} addrspace(12)*, !dbg !17069, !enzyme_inactive !0
  call void @ijl_throw({} addrspace(12)* %102) #72, !dbg !17069
  unreachable, !dbg !17069
}

; Function Attrs: mustprogress
define internal fastcc void @fwddiffe33julia_gemm__45289({ { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(112) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-1,0,8]:Pointer, [-1,0,8,0]:Integer, [-1,0,8,1]:Integer, [-1,0,8,2]:Integer, [-1,0,8,3]:Integer, [-1,0,8,4]:Integer, [-1,0,8,5]:Integer, [-1,0,8,6]:Integer, [-1,0,8,7]:Integer, [-1,0,8,8]:Pointer, [-1,0,8,8,-1]:Float@double, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer, [-1,40]:Integer, [-1,41]:Integer, [-1,42]:Integer, [-1,43]:Integer, [-1,44]:Integer, [-1,45]:Integer, [-1,46]:Integer, [-1,47]:Integer, [-1,48]:Integer, [-1,49]:Integer, [-1,50]:Integer, [-1,51]:Integer, [-1,52]:Integer, [-1,53]:Integer, [-1,54]:Integer, [-1,55]:Integer}" "enzymejl_parmtype"="133462757816656" "enzymejl_parmtype_ref"="1" %0, [33 x { { {} addrspace(10)*, [1 x [2 x i64]], i64, i64 }, [2 x i64] } addrspace(11)*] %"'", {} addrspace(10)* noundef nonnull readonly align 8 dereferenceable(32) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer}" "enzymejl_parmtype"="133464533019408" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* noundef nonnull readonly align 8 dereferenceable(32) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer}" "enzymejl_parmtype"="133464533019408" "enzymejl_parmtype_ref"="2" %2, [33 x {} addrspace(10)*] %"'1") unnamed_addr #71 !dbg !17096 {
top:
 %%% MORE STUFF REMOVED DUE TO SPACE CONSTRAINTS
}

ERROR: LLVM error: function failed verification (4)
Stacktrace:
  [1] handle_error(reason::Cstring)
    @ LLVM ~/.julia/packages/LLVM/b3kFs/src/core/context.jl:194
  [2] EnzymeCreateForwardDiff(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{…}, TA::Enzyme.TypeAnalysis, returnValue::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{…}, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{…})
    @ Enzyme.API ~/.julia/packages/Enzyme/QsaeA/src/api.jl:334
  [3] enzyme!(job::GPUCompiler.CompilerJob{…}, mod::LLVM.Module, primalf::LLVM.Function, TT::Type, mode::Enzyme.API.CDerivativeMode, width::Int64, parallel::Bool, actualRetType::Type, wrap::Bool, modifiedBetween::NTuple{…} where N, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{…}, boxedArgs::Set{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:1745
  [4] codegen(output::Symbol, job::GPUCompiler.CompilerJob{…}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:4550
  [5] codegen
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:3353 [inlined]
  [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5410
  [7] _thunk
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5410 [inlined]
  [8] cached_compilation
    @ ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5462 [inlined]
  [9] thunkbase(mi::Core.MethodInstance, World::UInt64, FA::Type{…}, A::Type{…}, TT::Type, Mode::Enzyme.API.CDerivativeMode, width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, edges::Vector{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5573
 [10] thunk_generator(world::UInt64, source::LineNumberNode, FA::Type, A::Type, TT::Type, Mode::Enzyme.API.CDerivativeMode, Width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, self::Any, fakeworld::Any, fa::Type, a::Type, tt::Type, mode::Type, width::Type, modifiedbetween::Type, returnprimal::Type, shadowinit::Type, abi::Type, erriffuncwritten::Type, runtimeactivity::Type)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/QsaeA/src/compiler.jl:5758
 [11] autodiff(::ForwardMode{…}, ::Const{…}, ::Type{…}, ::Const{…}, ::BatchDuplicated{…}, ::BatchDuplicated{…}, ::Const{…}, ::Const{…}, ::Const{…})
    @ Enzyme ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:640
 [12] autodiff
    @ ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:544 [inlined]
 [13] autodiff
    @ ~/.julia/packages/Enzyme/QsaeA/src/Enzyme.jl:516 [inlined]
 [14] hess(model::Chain{…}, θ::ComponentVector{…}, st::@NamedTuple{}, x::Matrix{…}, y::Matrix{…})
    @ Main ./REPL[18]:8
 [15] top-level scope
    @ REPL[19]:1
Some type information was truncated. Use `show(err)` to see complete types.
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

1 participant