You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I use the Enzyme, it failed with "ERROR: LoadError: Enzyme compilation failed due to illegal type analysis". How to find problem code?
the whole :
ERROR: LoadError: Enzyme compilation failed due to illegal type analysis.
Current scope:
; Function Attrs: mustprogress willreturn
define internal fastcc nonnull "enzyme_type"="{}" {} addrspace(10)* @preprocess_julia_worker_from_id_15359(i64 signext "enzyme_inactive" "enzyme_type"="{[-1]:Integer}" "enzymejl_parmtype"="140642892488192" "enzymejl_parmtype_ref"="0" %0) unnamed_addr #270 !dbg !18028 {
top:
%1 = call {}*** @julia.get_pgcstack() #271
%ptls_field13 = getelementptr inbounds {}, {}* %1, i64 2
%2 = bitcast {}*** %ptls_field13 to i64***
%ptls_load1415 = load i64**, i64*** %2, align 8, !tbaa !252
%3 = getelementptr inbounds i64*, i64** %ptls_load1415, i64 2
%safepoint = load i64*, i64** %3, align 8, !tbaa !256
fence syncscope("singlethread") seq_cst
call void @julia.safepoint(i64* %safepoint) #271, !dbg !18029
fence syncscope("singlethread") seq_cst
%getfield = load atomic {} addrspace(10), {} addrspace(10)** inttoptr (i64 140641252134832 to {} addrspace(10)**) unordered, align 16, !dbg !18030, !tbaa !327, !alias.scope !284, !noalias !285, !nonnull !251, !dereferenceable !5335, !align !1089, !enzyme_inactive !251
%4 = addrspacecast {} addrspace(10) %getfield to i8 addrspace(11), !dbg !18033
%5 = getelementptr inbounds i8, i8 addrspace(11) %4, i64 32, !dbg !18033
%6 = bitcast i8 addrspace(11)* %5 to i64 addrspace(11), !dbg !18033
%7 = load i64, i64 addrspace(11) %6, align 8, !dbg !18033, !tbaa !280, !alias.scope !284, !noalias !285
%8 = icmp eq i64 %7, 0, !dbg !18035
br i1 %8, label %L15, label %L7, !dbg !18032
L7: ; preds = %top
%9 = call fastcc i64 @julia_ht_keyindex_15399({} addrspace(10)* noundef nonnull align 8 dereferenceable(64) %getfield, i64 signext %0) #271, !dbg !18036
%10 = icmp slt i64 %9, 0, !dbg !18038
br i1 %10, label %L15, label %L12, !dbg !18032
L12: ; preds = %L7
%current_task112 = getelementptr inbounds {}, {}* %1, i64 -14
%current_task1 = bitcast {}*** %current_task112 to {}**
%box = call noalias nonnull dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641252105712 to {}) to {} addrspace(10))) #272, !dbg !18040
%memcpy_refined_dst = bitcast {} addrspace(10)* %box to i64 addrspace(10), !dbg !18040
store i64 %0, i64 addrspace(10) %memcpy_refined_dst, align 8, !dbg !18040, !tbaa !327, !alias.scope !284, !noalias !18041
%11 = addrspacecast {} addrspace(10)* %box to {} addrspace(12), !dbg !18040
call void @ijl_throw({} addrspace(12) %11) #271, !dbg !18040
unreachable, !dbg !18040
L15: ; preds = %L7, %top
%12 = call fastcc i64 @julia_ht_keyindex_15394(i64 signext %0) #271, !dbg !18044
%13 = icmp sgt i64 %12, -1, !dbg !18046
br i1 %13, label %L20, label %L26, !dbg !18047
L20: ; preds = %L15
%getfield11 = load atomic {} addrspace(10), {} addrspace(10)** inttoptr (i64 140641252208784 to {} addrspace(10)**) unordered, align 16, !dbg !18048, !tbaa !280, !alias.scope !284, !noalias !285, !nonnull !251, !dereferenceable !274, !align !275
%14 = add nsw i64 %12, -1, !dbg !18049
%15 = addrspacecast {} addrspace(10) %getfield11 to {} addrspace(10)* addrspace(13)* addrspace(11), !dbg !18049
%arrayptr16 = load {} addrspace(10) addrspace(13), {} addrspace(10) addrspace(13)* addrspace(11)* %15, align 16, !dbg !18049, !tbaa !483, !alias.scope !18050, !noalias !312, !nonnull !251
%16 = getelementptr inbounds {} addrspace(10), {} addrspace(10) addrspace(13)* %arrayptr16, i64 %14, !dbg !18049
%arrayref = load {} addrspace(10), {} addrspace(10) addrspace(13)* %16, align 8, !dbg !18049, !tbaa !689, !alias.scope !284, !noalias !285
%.not17 = icmp eq {} addrspace(10)* %arrayref, null, !dbg !18049
br i1 %.not17, label %fail, label %L50, !dbg !18049
L26: ; preds = %L15
%17 = load i64, i64* inttoptr (i64 140641252183616 to i64*), align 64, !dbg !18051, !tbaa !280, !alias.scope !284, !noalias !285
%.not = icmp eq i64 %17, 1, !dbg !18054
br i1 %.not, label %L30, label %L33, !dbg !18053
L30: ; preds = %L26
%18 = call noalias nonnull "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @ijl_box_int64(i64 signext %0) #273, !dbg !18055
%19 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10), {} addrspace(10)**, i32, {} addrspace(10)), {} addrspace(10), {} addrspace(10), ...) @julia.call2({} addrspace(10) ({} addrspace(10), {} addrspace(10)**, i32, {} addrspace(10))* noundef nonnull @ijl_invoke, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 140642871308736 to {}) to {} addrspace(10)), {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 140642820597008 to {}) to {} addrspace(10)), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641253041184 to {}) to {} addrspace(10)), {} addrspace(10)* nonnull %18, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641253041152 to {}) to {} addrspace(10))) #274, !dbg !18055
call fastcc void @julia_error_15397({} addrspace(10)* nofree noundef nonnull %19) #275, !dbg !18055
unreachable, !dbg !18055
L33: ; preds = %L26
%20 = call fastcc nonnull {} addrspace(10)* @julia_Worker_15383(i64 signext %0) #271, !dbg !18056
%21 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @julia.typeof({} addrspace(10)* nonnull %20) #276, !dbg !18058
%22 = addrspacecast {} addrspace(10)* %21 to {} addrspace(11), !dbg !18058
%23 = call nonnull {} @julia.pointer_from_objref({} addrspace(11)* %22) #276, !dbg !18058
%magicptr = ptrtoint {}* %23 to i64, !dbg !18058
switch i64 %magicptr, label %L46 [
i64 140641251749120, label %L38
i64 140641251859360, label %L43
], !dbg !18058
L38: ; preds = %L33
call fastcc void @julia_setindex__15379({} addrspace(10)* nofree noundef nonnull align 8 dereferenceable(32) %20, i64 signext %0) #271, !dbg !18058
br label %L50, !dbg !18058
L43: ; preds = %L33
call fastcc void @julia_setindex__15367({} addrspace(10)* nofree noundef nonnull align 8 dereferenceable(128) %20, i64 signext %0) #271, !dbg !18058
br label %L50, !dbg !18058
L46: ; preds = %L33
call void @ijl_throw({} addrspace(12)* addrspacecast ({}* inttoptr (i64 140642880764576 to {}) to {} addrspace(12))) #271, !dbg !18058
unreachable, !dbg !18058
L50: ; preds = %L43, %L38, %L20
%value_phi6 = phi {} addrspace(10)* [ %20, %L43 ], [ %20, %L38 ], [ %arrayref, %L20 ]
ret {} addrspace(10)* %value_phi6, !dbg !18058
fail: ; preds = %L20
call void @ijl_throw({} addrspace(12)* addrspacecast ({}* inttoptr (i64 140642891345184 to {}) to {} addrspace(12))) #271, !dbg !18049
unreachable, !dbg !18049
}
Type analysis state:
%arrayptr16 = load {} addrspace(10)* addrspace(13), {} addrspace(10) addrspace(13)* addrspace(11)* %15, align 16, !dbg !312, !tbaa !315, !alias.scope !318, !noalias !319, !nonnull !251: {[-1]:Pointer}, intvals: {}
%value_phi6 = phi {} addrspace(10)* [ %20, %L43 ], [ %20, %L38 ], [ %arrayref, %L20 ]: {}, intvals: {}
%19 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10), {} addrspace(10)**, i32, {} addrspace(10)), {} addrspace(10), {} addrspace(10), ...) @julia.call2({} addrspace(10) ({} addrspace(10), {} addrspace(10)**, i32, {} addrspace(10))* noundef nonnull @ijl_invoke, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 140642871308736 to {}) to {} addrspace(10)), {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 140642820597008 to {}) to {} addrspace(10)), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641253041184 to {}) to {} addrspace(10)), {} addrspace(10)* nonnull %18, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641253041152 to {}) to {} addrspace(10))) #274, !dbg !327: {[-1]:Pointer}, intvals: {}
%12 = call fastcc i64 @julia_ht_keyindex_15394(i64 signext %0) #271, !dbg !303: {[-1]:Integer}, intvals: {}
%box = call noalias nonnull dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}** nonnull %current_task1, i64 8, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 140641252105712 to {}) to {} addrspace(10))) #272, !dbg !299: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
%18 = call noalias nonnull "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @ijl_box_int64(i64 signext %0) #273, !dbg !327: {[-1]:Pointer, [-1,-1]:Integer}, intvals: {}
i64 %0: {[-1]:Integer}, intvals: {}
%getfield = load atomic {} addrspace(10), {} addrspace(10)** inttoptr (i64 140641252134832 to {} addrspace(10)**) unordered, align 16, !dbg !259, !tbaa !266, !alias.scope !270, !noalias !273, !nonnull !251, !dereferenceable !278, !align !279, !enzyme_inactive !251: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-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]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]: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}, intvals: {}
%15 = addrspacecast {} addrspace(10) %getfield11 to {} addrspace(10)* addrspace(13)* addrspace(11), !dbg !312: {[-1]:Pointer, [-1,0]:Pointer}, intvals: {}
%9 = call fastcc i64 @julia_ht_keyindex_15399({} addrspace(10) noundef nonnull align 8 dereferenceable(64) %getfield, i64 signext %0) #271, !dbg !289: {[-1]:Integer}, intvals: {}
%20 = call fastcc nonnull {} addrspace(10)* @julia_Worker_15383(i64 signext %0) #271, !dbg !328: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,16]:Pointer, [-1,8,24]:Pointer, [-1,8,24,-1]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,8,40]:Integer, [-1,8,41]:Integer, [-1,8,42]:Integer, [-1,8,43]:Integer, [-1,8,44]:Integer, [-1,8,45]:Integer, [-1,8,46]:Integer, [-1,8,47]:Integer, [-1,8,48]:Integer, [-1,8,49]:Integer, [-1,8,50]:Integer, [-1,8,51]:Integer, [-1,8,52]:Integer, [-1,8,53]:Integer, [-1,8,54]:Integer, [-1,8,55]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,24]:Pointer}, intvals: {}
%21 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @julia.typeof({} addrspace(10)* nonnull %20) #276, !dbg !331: {[-1]:Pointer}, intvals: {}
Illegal updateAnalysis prev:{[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,16]:Integer, [-1,17]:Integer, [-1,24]:Pointer} new: {[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,16]:Pointer, [-1,8,24]:Pointer, [-1,8,24,-1]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,8,40]:Integer, [-1,8,41]:Integer, [-1,8,42]:Integer, [-1,8,43]:Integer, [-1,8,44]:Integer, [-1,8,45]:Integer, [-1,8,46]:Integer, [-1,8,47]:Integer, [-1,8,48]:Integer, [-1,8,49]:Integer, [-1,8,50]:Integer, [-1,8,51]:Integer, [-1,8,52]:Integer, [-1,8,53]:Integer, [-1,8,54]:Integer, [-1,8,55]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,0]:Pointer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,0]:Pointer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Integer, [-1,40]:Pointer, [-1,48]:Integer, [-1,49]:Integer, [-1,56]:Float@double, [-1,64]:Pointer, [-1,72]:Pointer, [-1,80]:Pointer, [-1,96]:Pointer, [-1,104]:Pointer, [-1,104,56]:Pointer, [-1,104,112]:Pointer, [-1,104,152]:Pointer, [-1,120]:Pointer, [-1,120,0]:Pointer, [-1,120,8]:Pointer, [-1,120,8,8]:Integer, [-1,120,8,9]:Integer, [-1,120,8,10]:Integer, [-1,120,8,11]:Integer, [-1,120,8,12]:Integer, [-1,120,8,16]:Pointer, [-1,120,8,24]:Pointer, [-1,120,8,24,-1]:Integer, [-1,120,8,32]:Integer, [-1,120,8,33]:Integer, [-1,120,8,34]:Integer, [-1,120,8,35]:Integer, [-1,120,8,36]:Integer, [-1,120,8,37]:Integer, [-1,120,8,38]:Integer, [-1,120,8,39]:Integer, [-1,120,8,40]:Integer, [-1,120,8,41]:Integer, [-1,120,8,42]:Integer, [-1,120,8,43]:Integer, [-1,120,8,44]:Integer, [-1,120,8,45]:Integer, [-1,120,8,46]:Integer, [-1,120,8,47]:Integer, [-1,120,8,48]:Integer, [-1,120,8,49]:Integer, [-1,120,8,50]:Integer, [-1,120,8,51]:Integer, [-1,120,8,52]:Integer, [-1,120,8,53]:Integer, [-1,120,8,54]:Integer, [-1,120,8,55]:Integer, [-1,120,16]:Integer, [-1,120,17]:Integer}
val: %20 = call fastcc nonnull {} addrspace(10)* @julia_Worker_15383(i64 signext %0) #271, !dbg !328 origin= call fastcc void @julia_setindex__15367({} addrspace(10)* nofree noundef nonnull align 8 dereferenceable(128) %20, i64 signext %0) #271, !dbg !331
MethodInstance for Distributed.worker_from_id(::Distributed.ProcessGroup, ::Int64)
Beta Was this translation helpful? Give feedback.
All reactions