Enzyme.jl
Enzyme.jl copied to clipboard
Error for autodiff on mul!, using 2D view of 3D array. "cannot handle blas argument alpha within syrk of..."
MWE:
using Enzyme
using LinearAlgebra
struct TestCache2
J::Array{Float64, 3}
M::Array{Float64, 2}
end
function test_func_1(cache::TestCache2, f::Float64)
J = view(cache.J, 1:3, 1:2, 1)
mul!(cache.M, J', J, f, 1.0)
cache.M[1, 1]
end
cache = TestCache2(ones(3, 2, 1), zeros(2, 2))
dcache = TestCache2(zeros(3, 2, 1), zeros(2, 2))
dup_cache = Duplicated(dcache, deepcopy(dcache))
autodiff(Reverse, test_func_1, dup_cache, Active(2.0))
Julia verions: 1.10.4 Enzyme version: V0.12.36
Stacktrace:
ERROR: Current scope:
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia_syrk__22398(double "enzyme_type"="{[-1]:Float@double}" "enzymejl_parmtype"="131242818136800" "enzymejl_parmtype_ref"="0" %0, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(64) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Float@double, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer, [-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,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]: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, [-1,56]:Integer, [-1,57]:Integer, [-1,58]:Integer, [-1,59]:Integer, [-1,60]:Integer, [-1,61]:Integer, [-1,62]:Integer, [-1,63]:Integer}" "enzymejl_parmtype"="131241025486096" "enzymejl_parmtype_ref"="1" %1, double "enzyme_type"="{[-1]:Float@double}" "enzymejl_parmtype"="131242818136800" "enzymejl_parmtype_ref"="0" %2, {} addrspace(10)* noundef nonnull align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-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}" "enzymejl_parmtype"="131242934521488" "enzymejl_parmtype_ref"="2" %3) unnamed_addr #68 !dbg !5496 {
top:
%4 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%5 = bitcast i8* %4 to i64*, !enzyme_caststack !0
%6 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%7 = bitcast i8* %6 to i64*, !enzyme_caststack !0
%8 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%9 = bitcast i8* %8 to i64*, !enzyme_caststack !0
%10 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%11 = bitcast i8* %10 to i64*, !enzyme_caststack !0
%12 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%13 = bitcast i8* %12 to i64*, !enzyme_caststack !0
%14 = call noalias nonnull dereferenceable(1) dereferenceable_or_null(1) i8* @malloc(i64 1), !enzyme_fromstack !5497
%15 = call noalias nonnull dereferenceable(8) dereferenceable_or_null(8) i8* @malloc(i64 8), !enzyme_fromstack !174
%16 = bitcast i8* %15 to i64*, !enzyme_caststack !0
%17 = call noalias nonnull dereferenceable(1) dereferenceable_or_null(1) i8* @malloc(i64 1), !enzyme_fromstack !5497
%18 = call noalias nonnull dereferenceable(16) dereferenceable_or_null(16) i8* @malloc(i64 16), !enzyme_fromstack !4545
%newstruct119 = bitcast i8* %18 to [2 x i64]*, !enzyme_caststack !0
%19 = call {}*** @julia.get_pgcstack() #73
%current_task1144 = getelementptr inbounds {}**, {}*** %19, i64 -14
%current_task1 = bitcast {}*** %current_task1144 to {}**
%ptls_field145 = getelementptr inbounds {}**, {}*** %19, i64 2
%20 = bitcast {}*** %ptls_field145 to i64***
%ptls_load146147 = load i64**, i64*** %20, align 8, !tbaa !61
%21 = getelementptr inbounds i64*, i64** %ptls_load146147, i64 2
%safepoint = load i64*, i64** %21, align 8, !tbaa !65
fence syncscope("singlethread") seq_cst
call void @julia.safepoint(i64* %safepoint) #73, !dbg !5498
fence syncscope("singlethread") seq_cst
%22 = addrspacecast {} addrspace(10)* %3 to {} addrspace(10)* addrspace(11)*, !dbg !5499
%arraysize_ptr = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %22, i64 3, !dbg !5499
%23 = bitcast {} addrspace(10)* addrspace(11)* %arraysize_ptr to i64 addrspace(11)*, !dbg !5499
%arraysize = load i64, i64 addrspace(11)* %23, align 8, !dbg !5499, !tbaa !65, !range !288, !alias.scope !101, !noalias !102, !enzyme_inactive !0
%arraysize_ptr6 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %22, i64 4, !dbg !5499
%24 = bitcast {} addrspace(10)* addrspace(11)* %arraysize_ptr6 to i64 addrspace(11)*, !dbg !5499
%arraysize7 = load i64, i64 addrspace(11)* %24, align 16, !dbg !5499, !tbaa !65, !range !288, !alias.scope !101, !noalias !102, !enzyme_inactive !0
%.not = icmp eq i64 %arraysize, %arraysize7, !dbg !5502
br i1 %.not, label %guard_pass124, label %L23, !dbg !5503
L23: ; preds = %top
%25 = getelementptr inbounds [2 x i64], [2 x i64]* %newstruct119, i64 0, i64 0, !dbg !5504
store i64 %arraysize, i64* %25, align 8, !dbg !5504, !tbaa !559, !alias.scope !561, !noalias !5505
%26 = getelementptr inbounds [2 x i64], [2 x i64]* %newstruct119, i64 0, i64 1, !dbg !5504
store i64 %arraysize7, i64* %26, align 8, !dbg !5504, !tbaa !559, !alias.scope !561, !noalias !5505
%27 = addrspacecast [2 x i64]* %newstruct119 to [2 x i64] addrspace(11)*, !dbg !5503
%28 = call nonnull {} addrspace(10)* @julia_string_22383({} addrspace(10)* nofree noundef nonnull align 16 addrspacecast ({}* inttoptr (i64 131242856547440 to {}*) to {} addrspace(10)*), [2 x i64] addrspace(11)* nocapture nofree noundef nonnull readonly align 8 dereferenceable(16) %27) #73, !dbg !5503
%box121 = call noalias nonnull dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 noundef 8, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 131242798269216 to {}*) to {} addrspace(10)*)) #74, !dbg !5503
%29 = bitcast {} addrspace(10)* %box121 to [1 x {} addrspace(10)*] addrspace(10)*, !dbg !5503, !enzyme_inactive !0
%30 = getelementptr [1 x {} addrspace(10)*], [1 x {} addrspace(10)*] addrspace(10)* %29, i64 0, i64 0, !dbg !5503
store {} addrspace(10)* %28, {} addrspace(10)* addrspace(10)* %30, align 8, !dbg !5503, !tbaa !418, !alias.scope !325, !noalias !5508
%31 = addrspacecast {} addrspace(10)* %box121 to {} addrspace(12)*, !dbg !5503, !enzyme_inactive !0
call void @ijl_throw({} addrspace(12)* %31) #75, !dbg !5503
unreachable, !dbg !5503
L62: ; preds = %guard_pass124
%newstruct16 = call noalias nonnull dereferenceable(16) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 noundef 16, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 131242746570320 to {}*) to {} addrspace(10)*)) #74, !dbg !5509
%32 = addrspacecast {} addrspace(10)* %newstruct16 to {} addrspace(10)* addrspace(11)*, !dbg !5509, !enzyme_inactive !0
store {} addrspace(10)* null, {} addrspace(10)* addrspace(11)* %32, align 8, !dbg !5509, !tbaa !435, !alias.scope !325, !noalias !5508
%33 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %32, i64 1, !dbg !5509
store {} addrspace(10)* null, {} addrspace(10)* addrspace(11)* %33, align 8, !dbg !5509, !tbaa !435, !alias.scope !325, !noalias !5508
%box18 = call noalias nonnull dereferenceable(48) "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}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 noundef 48, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 131242767519712 to {}*) to {} addrspace(10)*)) #74, !dbg !5509
%34 = bitcast {} addrspace(10)* %box18 to { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)*, !dbg !5509, !enzyme_inactive !0
%.repack = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 0, !dbg !5509
store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 131242880610560 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
%.repack149 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 1, !dbg !5509
store i64 %arraysize, i64 addrspace(10)* %.repack149, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
%.repack151 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 2, !dbg !5509
store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 131242880610528 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack151, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
%.repack153 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 3, !dbg !5509
store i64 %arraysize, i64 addrspace(10)* %.repack153, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
%.repack155 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 4, !dbg !5509
store {} addrspace(10)* addrspacecast ({}* inttoptr (i64 131242880610464 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(10)* %.repack155, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
%.repack157 = getelementptr inbounds { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 }, { {} addrspace(10)*, i64, {} addrspace(10)*, i64, {} addrspace(10)*, i64 } addrspace(10)* %34, i64 0, i32 5, !dbg !5509
store i64 %85, i64 addrspace(10)* %.repack157, align 8, !dbg !5509, !tbaa !418, !alias.scope !325, !noalias !5508
store atomic {} addrspace(10)* %box18, {} addrspace(10)* addrspace(11)* %32 release, align 8, !dbg !5509, !tbaa !435, !alias.scope !325, !noalias !5508
call void ({} addrspace(10)*, ...) @julia.write_barrier({} addrspace(10)* nofree noundef nonnull %newstruct16, {} addrspace(10)* nofree nonnull %box18) #76, !dbg !5509
%35 = addrspacecast {} addrspace(10)* %newstruct16 to i8 addrspace(11)*, !dbg !5509, !enzyme_inactive !0
%36 = getelementptr inbounds i8, i8 addrspace(11)* %35, i64 8, !dbg !5509
%37 = bitcast i8 addrspace(11)* %36 to {} addrspace(10)* addrspace(11)*, !dbg !5509
store atomic {} addrspace(10)* addrspacecast ({}* inttoptr (i64 131242971914248 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspace(11)* %37 release, align 8, !dbg !5509, !tbaa !435, !alias.scope !325, !noalias !5508
%box20 = call noalias nonnull dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 noundef 8, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 131242798269216 to {}*) to {} addrspace(10)*)) #74, !dbg !5510
%38 = bitcast {} addrspace(10)* %box20 to [1 x {} addrspace(10)*] addrspace(10)*, !dbg !5510, !enzyme_inactive !0
%39 = getelementptr [1 x {} addrspace(10)*], [1 x {} addrspace(10)*] addrspace(10)* %38, i64 0, i64 0, !dbg !5510
store {} addrspace(10)* %newstruct16, {} addrspace(10)* addrspace(10)* %39, align 8, !dbg !5510, !tbaa !418, !alias.scope !325, !noalias !5508
%40 = addrspacecast {} addrspace(10)* %box20 to {} addrspace(12)*, !dbg !5510, !enzyme_inactive !0
call void @ijl_throw({} addrspace(12)* %40) #75, !dbg !5510
unreachable, !dbg !5510
L118: ; preds = %guard_pass124
store i8 85, i8* %17, align 1, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%41 = add i64 %unbox, 1, !dbg !5515
%42 = sub i64 %41, %unbox9, !dbg !5523
%43 = call i64 @llvm.smax.i64(i64 %42, i64 noundef 0) #73, !dbg !5524
%44 = addrspacecast {} addrspace(10)* %3 to {} addrspace(11)*, !dbg !5499
%45 = bitcast i64* %16 to i8*
%46 = bitcast i64* %13 to i8*
%47 = bitcast i64* %9 to i8*
%48 = bitcast i64* %5 to i8*
%49 = bitcast i64* %7 to i8*
%50 = bitcast i64* %11 to i8*
store i8 84, i8* %14, align 1, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
store i64 %arraysize, i64* %11, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
store i64 %43, i64* %7, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%51 = bitcast i64* %5 to double*, !dbg !5511
store double %0, double* %51, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%getfield_addr = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 0, !dbg !5529
%getfield = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %getfield_addr unordered, align 8, !dbg !5529, !tbaa !65, !alias.scope !101, !noalias !102, !nonnull !0
%52 = addrspacecast {} addrspace(10)* %getfield to {} addrspace(11)*, !dbg !5532
%53 = addrspacecast {} addrspace(10)* %getfield to {} addrspace(10)* addrspace(11)*, !dbg !5532
%arraysize_ptr47 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %53, i64 3, !dbg !5532
%54 = bitcast {} addrspace(10)* addrspace(11)* %arraysize_ptr47 to i64 addrspace(11)*, !dbg !5532
%arraysize48 = load i64, i64 addrspace(11)* %54, align 8, !dbg !5532, !tbaa !65, !range !288, !alias.scope !101, !noalias !102
%.not159 = icmp eq i64 %arraysize48, 0, !dbg !5537
%55 = select i1 %.not159, i64 1, i64 %arraysize48, !dbg !5539
store i64 %55, i64* %9, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%56 = bitcast i64* %13 to double*, !dbg !5511
store double %2, double* %56, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%.not160 = icmp eq i64 %arraysize, 0, !dbg !5537
%57 = select i1 %.not160, i64 1, i64 %arraysize, !dbg !5539
store i64 %57, i64* %16, align 16, !dbg !5511, !tbaa !435, !alias.scope !325, !noalias !5508
%58 = call nonnull "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-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}" {}* @julia.pointer_from_objref({} addrspace(11)* %52) #77, !dbg !5540
%59 = bitcast {}* %58 to i8**, !dbg !5540
%arrayptr = load i8*, i8** %59, align 8, !dbg !5540, !tbaa !65, !alias.scope !101, !noalias !102, !nonnull !0
%60 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 1, i32 2, !dbg !5542
%arraysize_ptr84 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %53, i64 4, !dbg !5544
%61 = bitcast {} addrspace(10)* addrspace(11)* %arraysize_ptr84 to i64 addrspace(11)*, !dbg !5544
%arraysize85 = load i64, i64 addrspace(11)* %61, align 8, !dbg !5544, !tbaa !65, !range !288, !alias.scope !101, !noalias !102
%unbox90 = load i64, i64 addrspace(11)* %60, align 8, !dbg !5552, !tbaa !65, !alias.scope !101, !noalias !102
%62 = call nonnull "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-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}" {}* @julia.pointer_from_objref({} addrspace(11)* noundef %44) #77, !dbg !5558
%63 = bitcast {}* %62 to double**, !dbg !5558
%arrayptr100179 = load double*, double** %63, align 8, !dbg !5558, !tbaa !65, !alias.scope !101, !noalias !102, !nonnull !0
%64 = add i64 %unbox11, 2305843009213693951, !dbg !5559
%65 = add i64 %unbox90, 2305843009213693951, !dbg !5552
%66 = mul i64 %65, %arraysize85, !dbg !5561
%reass.add = add i64 %64, %66
%reass.mul = mul i64 %reass.add, %arraysize48
%67 = add i64 %reass.mul, %unbox9, !dbg !5562
%68 = shl i64 %67, 3, !dbg !5563
%69 = add i64 %68, -8, !dbg !5563
%70 = getelementptr i8, i8* %arrayptr, i64 %69, !dbg !5564
%71 = insertvalue { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } undef, {} addrspace(10)* %getfield, 0, !dbg !5514
%72 = insertvalue [2 x i64] undef, i64 %unbox9, 0, !dbg !5514
%unbox105.unpack162.unpack175 = insertvalue [2 x i64] %72, i64 %unbox, 1, !dbg !5514
%73 = insertvalue { [2 x i64], [2 x i64], i64 } undef, [2 x i64] %unbox105.unpack162.unpack175, 0, !dbg !5514
%74 = insertvalue [2 x i64] undef, i64 %unbox11, 0, !dbg !5514
%unbox105.unpack162.unpack169178 = insertvalue [2 x i64] %74, i64 %unbox10, 1, !dbg !5514
%75 = insertvalue { [2 x i64], [2 x i64], i64 } %73, [2 x i64] %unbox105.unpack162.unpack169178, 1, !dbg !5514
%unbox105.unpack162172 = insertvalue { [2 x i64], [2 x i64], i64 } %75, i64 %unbox90, 2, !dbg !5514
%76 = insertvalue { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } %71, { [2 x i64], [2 x i64], i64 } %unbox105.unpack162172, 1, !dbg !5514
%unbox105.elt163 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 2, !dbg !5514
%unbox105.unpack164 = load i64, i64 addrspace(11)* %unbox105.elt163, align 8, !dbg !5514, !tbaa !65, !alias.scope !101, !noalias !102, !enzyme_inactive !0
%77 = insertvalue { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } %76, i64 %unbox105.unpack164, 2, !dbg !5514
%unbox105.elt165 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 3, !dbg !5514
%unbox105.unpack166 = load i64, i64 addrspace(11)* %unbox105.elt165, align 8, !dbg !5514, !tbaa !65, !alias.scope !101, !noalias !102, !enzyme_inactive !0
%unbox105167 = insertvalue { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } %77, i64 %unbox105.unpack166, 3, !dbg !5514
%78 = bitcast i8* %70 to double*, !dbg !5514
call void @dsyrk_64_(i8* noundef nonnull %17, i8* noundef nonnull %14, i8* noundef nonnull %50, i8* noundef nonnull %49, i8* noundef nonnull %48, double* %78, i8* noundef nonnull %47, i8* noundef nonnull %46, double* nonnull %arrayptr100179, i8* noundef nonnull %45, i64 noundef 1, i64 noundef 1) #73 [ "jl_roots"({} addrspace(10)* null, {} addrspace(10)* %3, {} addrspace(10)* null, {} addrspace(10)* null, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } %unbox105167, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null) ], !dbg !5514
ret void, !dbg !5514
guard_pass124: ; preds = %top
%79 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 1, i32 0, i64 0, !dbg !5565
%80 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 1, i32 0, i64 1, !dbg !5568
%unbox = load i64, i64 addrspace(11)* %80, align 8, !dbg !5515, !tbaa !65, !alias.scope !101, !noalias !102
%unbox9 = load i64, i64 addrspace(11)* %79, align 8, !dbg !5515, !tbaa !65, !alias.scope !101, !noalias !102
%81 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 1, i32 1, i64 0, !dbg !5570
%82 = getelementptr inbounds { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 }, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } addrspace(11)* %1, i64 0, i32 1, i32 1, i64 1, !dbg !5575
%unbox10 = load i64, i64 addrspace(11)* %82, align 8, !dbg !5577, !tbaa !65, !alias.scope !101, !noalias !102
%unbox11 = load i64, i64 addrspace(11)* %81, align 8, !dbg !5577, !tbaa !65, !alias.scope !101, !noalias !102
%83 = add i64 %unbox10, 1, !dbg !5577
%84 = sub i64 %83, %unbox11, !dbg !5579
%85 = call i64 @llvm.smax.i64(i64 %84, i64 noundef 0) #73, !dbg !5580
%86 = icmp eq i64 %85, %arraysize, !dbg !5585
br i1 %86, label %L118, label %L62, !dbg !5510
}
in Mode: ReverseModeGradient
cannot handle blas argument alpha within syrk of call void @dsyrk_64_(i8* noundef nonnull %17, i8* noundef nonnull %14, i8* noundef nonnull %50, i8* noundef nonnull %49, i8* noundef nonnull %48, double* %78, i8* noundef nonnull %47, i8* noundef nonnull %46, double* nonnull %arrayptr100179, i8* noundef nonnull %45, i64 noundef 1, i64 noundef 1) #73 [ "jl_roots"({} addrspace(10)* null, {} addrspace(10)* %3, {} addrspace(10)* null, {} addrspace(10)* null, { {} addrspace(10)*, { [2 x i64], [2 x i64], i64 }, i64, i64 } %unbox105167, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null, {} addrspace(10)* null) ], !dbg !119
Stacktrace:
[1] syrk!
@ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/blas.jl:1784
Stacktrace:
[1] syrk_wrapper!
@ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:512
[2] generic_matmatmul!
@ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:344 [inlined]
[3] mul!
@ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:263 [inlined]
[4] test_func_1
@ ~/code/RobotDynamics.jl/examples/gradients/broken_enzyme_mul.jl:12 [inlined]
[5] test_func_1
@ ~/code/RobotDynamics.jl/examples/gradients/broken_enzyme_mul.jl:0 [inlined]
[6] diffejulia_test_func_1_22209_inner_1wrap
@ ~/code/RobotDynamics.jl/examples/gradients/broken_enzyme_mul.jl:0
[7] macro expansion
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:7187 [inlined]
[8] enzyme_call
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:6794 [inlined]
[9] CombinedAdjointThunk
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:6671 [inlined]
[10] autodiff
@ ~/.julia/packages/Enzyme/TiboG/src/Enzyme.jl:320 [inlined]
[11] autodiff
@ ~/.julia/packages/Enzyme/TiboG/src/Enzyme.jl:348 [inlined]
[12] autodiff(::ReverseMode{false, FFIABI, false, false}, ::typeof(test_func_1), ::Duplicated{TestCache2}, ::Active{Float64})
@ Enzyme ~/.julia/packages/Enzyme/TiboG/src/Enzyme.jl:329
[13] top-level scope
@ ~/code/RobotDynamics.jl/examples/gradients/broken_enzyme_mul.jl:20