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

Enzyme support for TimerOutputs.jl #1480

Closed
ChrisRackauckas opened this issue May 29, 2024 · 7 comments
Closed

Enzyme support for TimerOutputs.jl #1480

ChrisRackauckas opened this issue May 29, 2024 · 7 comments

Comments

@ChrisRackauckas
Copy link
Contributor

Included is the GC segfault I get when a TimerOutputs.jl @timeit command is within the Enzyme autodiff:

message.txt

I think it's probably best to figure out what to label as inactive in that package as its timing data is inherently global I/O mess, though maybe fixing the GC stuff in that kind of situation is a better long-term solution.

I found this as part of a much larger push for Enzyme compatibility ODINN-SciML/ODINN.jl#151 so I don't have an MWE on hand, though I think if you take a standard autodiff test and add a @timeit to begin ... end inside of it you should hit the same thing.

@wsmoses
Copy link
Member

wsmoses commented Jun 6, 2024

ah famous GC segfault.

MWE defintely needed, or at least a reproducer

@wsmoses
Copy link
Member

wsmoses commented Jun 15, 2024

@ChrisRackauckas can you post a reproducer/MWE here?

@ChrisRackauckas
Copy link
Contributor Author

I wasn't able to reproduce the GC segfault, but also am using a different computer for this. But I was able to show that Enzyme errors in the GC, so maybe that's just the newer behavior since I did get a version update between the time that was found and now.

using TimerOutputs, Enzyme
const to = TimerOutput()

function f(x::Array{Float64}, y::Array{Float64})
    @timeit to "a bit of time" y[1] = x[1] * x[1] + x[2] * x[1]
    return nothing
end;
x  = [2.0, 2.0]
bx = [0.0, 0.0]
y  = [0.0]
by = [1.0];
Enzyme.autodiff(Reverse, f, Duplicated(x, bx), Duplicated(y, by));

That gives:

julia> Enzyme.autodiff(Reverse, f, Duplicated(x, bx), Duplicated(y, by))
ERROR: Enzyme execution failed.
Enzyme compilation failed.
Current scope:
; Function Attrs: mustprogress willreturn
define void @preprocess_julia_f_25241({} 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"="140731401906064" "enzymejl_parmtype_ref"="2" %0, {} 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"="140731401906064" "enzymejl_parmtype_ref"="2" %1) local_unnamed_addr #37 !dbg !871 {
top:
  %2 = alloca i64, align 16
  %3 = bitcast i64* %2 to i8*
  %4 = alloca i64, align 16
  %5 = bitcast i64* %4 to i8*
  %phic = alloca i8, align 1
  %phic79 = alloca i64, align 8
  %phic81 = alloca i64, align 8
  %phic3 = alloca {} addrspace(10)*, align 8
  %phic83 = alloca i8, align 1
  %phic85 = alloca i8, align 1
  %phic6 = alloca {} addrspace(10)*, align 8
  %6 = call {}*** @julia.get_pgcstack() #38
  store {} addrspace(10)* null, {} addrspace(10)** %phic6, align 8, !noalias !872
  store {} addrspace(10)* null, {} addrspace(10)** %phic3, align 8, !noalias !872
  %ptls_field122 = getelementptr inbounds {}**, {}*** %6, i64 2
  %7 = bitcast {}*** %ptls_field122 to i64***
  %ptls_load123124 = load i64**, i64*** %7, align 8, !tbaa !20
  %8 = getelementptr inbounds i64*, i64** %ptls_load123124, i64 2
  %safepoint = load i64*, i64** %8, align 8, !tbaa !24
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #38, !dbg !875
  fence syncscope("singlethread") seq_cst
  %9 = load i8, i8* inttoptr (i64 1588956688921 to i8*), align 1, !dbg !876, !tbaa !43, !alias.scope !47, !noalias !50
  %10 = and i8 %9, 1, !dbg !876
  %.not = icmp eq i8 %10, 0, !dbg !876
  br i1 %.not, label %L5, label %L4, !dbg !879

L4:                                               ; preds = %top
  %11 = call fastcc nonnull {} addrspace(10)* @julia_push__25253() #38, !dbg !880
  br label %L5, !dbg !879

L5:                                               ; preds = %L4, %top
  %value_phi = phi {} addrspace(10)* [ %11, %L4 ], [ null, %top ]
  %value_phi8 = phi i8 [ 1, %L4 ], [ 0, %top ]
  store i64 0, i64* %2, align 16, !dbg !881, !tbaa !43, !alias.scope !47, !noalias !885
  %bitcast_coercion = ptrtoint i64* %2 to i64, !dbg !886
  call void @ijl_gc_get_total_bytes(i64 noundef %bitcast_coercion) #38 [ "jl_roots"({} addrspace(10)* null) ], !dbg !889
  %12 = load i64, i64* %2, align 16, !dbg !891, !tbaa !43, !alias.scope !47, !noalias !50
  call void @llvm.lifetime.end.p0i8(i64 noundef 8, i8* noundef nonnull %3) #38
  %13 = call i64 @ijl_hrtime() #38, !dbg !894
  store volatile i8 0, i8* %phic, align 1, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  store volatile i64 %13, i64* %phic79, align 8, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  store volatile i64 %12, i64* %phic81, align 8, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  store volatile {} addrspace(10)* %value_phi, {} addrspace(10)** %phic3, align 8, !dbg !896, !noalias !872
  store volatile i8 %value_phi8, i8* %phic83, align 1, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  store volatile i8 %10, i8* %phic85, align 1, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  store volatile {} addrspace(10)* addrspacecast ({}* inttoptr (i64 1588956688880 to {}*) to {} addrspace(10)*), {} addrspace(10)** %phic6, align 8, !dbg !896, !noalias !872
  %14 = call i64 @ijl_excstack_state() #38, !dbg !896
  %15 = call i32 @julia.except_enter() #39, !dbg !896
  %16 = icmp eq i32 %15, 0, !dbg !896
  br i1 %16, label %try, label %L43, !dbg !896

L43:                                              ; preds = %L5
  %phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0. = load volatile i8, i8* %phic, align 1, !dbg !896
  %phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0. = load volatile i64, i64* %phic79, align 8, !dbg !896
  %phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0. = load volatile i64, i64* %phic81, align 8, !dbg !896
  %phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0. = load volatile {} addrspace(10)*, {} addrspace(10)** %phic3, align 8, !dbg !896, !nonnull !19
  %phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0. = load volatile i8, i8* %phic83, align 1, !dbg !896
  %phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0. = load volatile i8, i8* %phic85, align 1, !dbg !896
  %phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0. = load volatile {} addrspace(10)*, {} addrspace(10)** %phic6, align 8, !dbg !896, !nonnull !19
  call void @ijl_pop_handler(i32 noundef 1) #38, !dbg !896
  %17 = and i8 %phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0.phic.0., 1, !dbg !879
  %phi.cast = icmp ne i8 %17, 0, !dbg !879
  br label %L52, !dbg !879

L52:                                              ; preds = %idxend43, %L43
  %value_phi46 = phi i1 [ true, %idxend43 ], [ %phi.cast, %L43 ]
  %value_phi47 = phi i64 [ %13, %idxend43 ], [ %phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0.phic79.0., %L43 ]
  %value_phi48 = phi i64 [ %12, %idxend43 ], [ %phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0.phic81.0., %L43 ]
  %value_phi49 = phi {} addrspace(10)* [ %value_phi, %idxend43 ], [ %phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0.phic3.0., %L43 ]    
  %value_phi50 = phi i8 [ %value_phi8, %idxend43 ], [ %phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0.phic83.0., %L43 ]        
  %value_phi51 = phi i8 [ %10, %idxend43 ], [ %phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0.phic85.0., %L43 ]
  %value_phi52 = phi {} addrspace(10)* [ addrspacecast ({}* inttoptr (i64 1588956688880 to {}*) to {} addrspace(10)*), %idxend43 ], [ %phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0.phic6.0., %L43 ]
  %18 = and i8 %value_phi51, 1, !dbg !898
  %.not125 = icmp eq i8 %18, 0, !dbg !898
  br i1 %.not125, label %L117, label %L61, !dbg !898

L61:                                              ; preds = %L52
  %19 = and i8 %value_phi50, 1, !dbg !899
  %.not126 = icmp eq i8 %19, 0, !dbg !899
  br i1 %.not126, label %err, label %ok, !dbg !899

L71:                                              ; preds = %ok
  call fastcc void @julia_throw_inexacterror_25251(i64 zeroext %49) #40, !dbg !900
  unreachable, !dbg !900

L78:                                              ; preds = %ok
  store i64 %49, i64 addrspace(11)* %45, align 8, !dbg !906, !tbaa !43, !alias.scope !47, !noalias !885
  %20 = getelementptr inbounds i8, i8 addrspace(11)* %43, i64 16, !dbg !907
  %21 = bitcast i8 addrspace(11)* %20 to i64 addrspace(11)*, !dbg !907
  %22 = load i64, i64 addrspace(11)* %21, align 8, !dbg !907, !tbaa !43, !alias.scope !47, !noalias !50
  store i64 0, i64* %4, align 16, !dbg !909, !tbaa !43, !alias.scope !47, !noalias !885
  %bitcast_coercion58 = ptrtoint i64* %4 to i64, !dbg !912
  call void @ijl_gc_get_total_bytes(i64 noundef %bitcast_coercion58) #38 [ "jl_roots"({} addrspace(10)* null) ], !dbg !915
  %23 = load i64, i64* %4, align 16, !dbg !917, !tbaa !43, !alias.scope !47, !noalias !50
  %24 = sub i64 %22, %value_phi48, !dbg !920
  %25 = add i64 %24, %23, !dbg !921
  store i64 %25, i64 addrspace(11)* %21, align 8, !dbg !922, !tbaa !43, !alias.scope !47, !noalias !885
  %26 = addrspacecast {} addrspace(10)* %value_phi49 to i64 addrspace(11)*, !dbg !923
  %27 = load i64, i64 addrspace(11)* %26, align 8, !dbg !923, !tbaa !43, !alias.scope !47, !noalias !50
  %28 = add i64 %27, 1, !dbg !925
  store i64 %28, i64 addrspace(11)* %26, align 8, !dbg !926, !tbaa !43, !alias.scope !47, !noalias !885
  %29 = addrspacecast {} addrspace(10)* %value_phi52 to i8 addrspace(11)*, !dbg !927
  %getfield_addr = getelementptr inbounds i8, i8 addrspace(11)* %29, i64 24, !dbg !927
  %30 = bitcast i8 addrspace(11)* %getfield_addr to {} addrspace(10)* addrspace(11)*, !dbg !927
  %getfield = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %30 unordered, align 8, !dbg !927, !tbaa !43, !alias.scope !47, !noalias !50, !nonnull !19, !dereferenceable !134, !align !135
  %31 = addrspacecast {} addrspace(10)* %getfield to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !930
  %arraylen_ptr62 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %31, i64 0, i32 1, !dbg !930
  %arraylen63 = load i64, i64 addrspace(11)* %arraylen_ptr62, align 8, !dbg !930, !tbaa !145, !range !148, !alias.scope !149, !noalias !150
  %.not127 = icmp eq i64 %arraylen63, 0, !dbg !933
  br i1 %.not127, label %L107, label %idxend72, !dbg !932

L107:                                             ; preds = %L78
  call void @llvm.lifetime.end.p0i8(i64 noundef 8, i8* noundef nonnull %5) #38
  call fastcc void @julia__throw_argerror_25249({} addrspace(10)* nofree noundef nonnull align 64 addrspacecast ({}* inttoptr (i64 140731482081600 to {}*) to {} addrspace(10)*)) #40, !dbg !934
  unreachable, !dbg !934

L117:                                             ; preds = %pass, %L52
  br i1 %16, label %L121, label %L119, !dbg !929

L119:                                             ; preds = %L117
  call fastcc void @julia_rethrow_25247() #40, !dbg !929
  unreachable, !dbg !929

L121:                                             ; preds = %L117
  br i1 %value_phi46, label %ok78, label %err77, !dbg !935

try:                                              ; preds = %L5
  %32 = addrspacecast {} addrspace(10)* %0 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !936
  %arraylen_ptr = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %32, i64 0, i32 1, !dbg !936
  %arraylen = load i64, i64 addrspace(11)* %arraylen_ptr, align 8, !dbg !936, !tbaa !145, !range !148, !alias.scope !149, !noalias !150
  %inbounds.not = icmp eq i64 %arraylen, 0, !dbg !936
  br i1 %inbounds.not, label %oob, label %idxend, !dbg !936

oob:                                              ; preds = %try
  %errorbox = alloca i64, align 8, !dbg !936
  store i64 1, i64* %errorbox, align 8, !dbg !936, !noalias !872
  %33 = addrspacecast {} addrspace(10)* %0 to {} addrspace(12)*, !dbg !936
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %33, i64* noundef nonnull align 8 %errorbox, i64 noundef 1) #40, !dbg !936
  unreachable, !dbg !936

idxend:                                           ; preds = %try
  %34 = addrspacecast {} addrspace(10)* %0 to double addrspace(13)* addrspace(11)*, !dbg !936
  %arrayptr130 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %34, align 16, !dbg !936, !tbaa !158, !alias.scope !937, !noalias !150, !nonnull !19
  %arrayref = load double, double addrspace(13)* %arrayptr130, align 8, !dbg !936, !tbaa !161, !alias.scope !47, !noalias !50
  %35 = fmul double %arrayref, %arrayref, !dbg !938
  %inbounds22.not = icmp eq i64 %arraylen, 1, !dbg !936
  br i1 %inbounds22.not, label %oob23, label %idxend34, !dbg !936

oob23:                                            ; preds = %idxend
  %errorbox24 = alloca i64, align 8, !dbg !936
  store i64 2, i64* %errorbox24, align 8, !dbg !936, !noalias !872
  %36 = addrspacecast {} addrspace(10)* %0 to {} addrspace(12)*, !dbg !936
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %36, i64* noundef nonnull align 8 %errorbox24, i64 noundef 1) #40, !dbg !936
  unreachable, !dbg !936

idxend34:                                         ; preds = %idxend
  %37 = addrspacecast {} addrspace(10)* %1 to { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)*, !dbg !939
  %arraylen_ptr38 = getelementptr inbounds { i8 addrspace(13)*, i64, i16, i16, i32 }, { i8 addrspace(13)*, i64, i16, i16, i32 } addrspace(11)* %37, i64 0, i32 1, !dbg !939
  %arraylen39 = load i64, i64 addrspace(11)* %arraylen_ptr38, align 8, !dbg !939, !tbaa !145, !range !148, !alias.scope !149, !noalias !150
  %inbounds40.not = icmp eq i64 %arraylen39, 0, !dbg !939
  br i1 %inbounds40.not, label %oob41, label %idxend43, !dbg !939

oob41:                                            ; preds = %idxend34
  %errorbox42 = alloca i64, align 8, !dbg !939
  store i64 1, i64* %errorbox42, align 8, !dbg !939, !noalias !872
  %38 = addrspacecast {} addrspace(10)* %1 to {} addrspace(12)*, !dbg !939
  call void @ijl_bounds_error_ints({} addrspace(12)* noundef %38, i64* noundef nonnull align 8 %errorbox42, i64 noundef 1) #40, !dbg !939
  unreachable, !dbg !939

idxend43:                                         ; preds = %idxend34
  %39 = getelementptr inbounds double, double addrspace(13)* %arrayptr130, i64 1, !dbg !936
  %arrayref28 = load double, double addrspace(13)* %39, align 8, !dbg !936, !tbaa !161, !alias.scope !47, !noalias !50
  %40 = fmul double %arrayref, %arrayref28, !dbg !938
  %41 = fadd double %35, %40, !dbg !940
  %42 = addrspacecast {} addrspace(10)* %1 to double addrspace(13)* addrspace(11)*, !dbg !939
  %arrayptr45131 = load double addrspace(13)*, double addrspace(13)* addrspace(11)* %42, align 16, !dbg !939, !tbaa !158, !alias.scope !937, !noalias !150, !nonnull !19
  store double %41, double addrspace(13)* %arrayptr45131, align 8, !dbg !939, !tbaa !161, !alias.scope !47, !noalias !885
  store volatile i8 1, i8* %phic, align 1, !dbg !896, !tbaa !87, !alias.scope !89, !noalias !897
  call void @ijl_pop_handler(i32 noundef 1) #38, !dbg !896
  br label %L52, !dbg !879

err:                                              ; preds = %L61
  call void @ijl_undefined_var_error({} addrspace(12)* noundef addrspacecast ({}* inttoptr (i64 1587490886456 to {}*) to {} addrspace(12)*)) #40, !dbg !899      
  unreachable, !dbg !899

ok:                                               ; preds = %L61
  %43 = addrspacecast {} addrspace(10)* %value_phi49 to i8 addrspace(11)*, !dbg !941
  %44 = getelementptr inbounds i8, i8 addrspace(11)* %43, i64 8, !dbg !941
  %45 = bitcast i8 addrspace(11)* %44 to i64 addrspace(11)*, !dbg !941
  %46 = load i64, i64 addrspace(11)* %45, align 8, !dbg !941, !tbaa !43, !alias.scope !47, !noalias !50
  %47 = call i64 @ijl_hrtime() #38, !dbg !942
  %48 = sub i64 %47, %value_phi47, !dbg !943
  %49 = add i64 %48, %46, !dbg !944
  %50 = icmp sgt i64 %49, -1, !dbg !946
  br i1 %50, label %L78, label %L71, !dbg !900

idxend72:                                         ; preds = %L78
  %51 = add nsw i64 %arraylen63, -1, !dbg !947
  %52 = addrspacecast {} addrspace(10)* %getfield to {} addrspace(10)* addrspace(13)* addrspace(11)*, !dbg !947
  %arrayptr74128 = load {} addrspace(10)* addrspace(13)*, {} addrspace(10)* addrspace(13)* addrspace(11)* %52, align 16, !dbg !947, !tbaa !158, !alias.scope !937, !noalias !150, !nonnull !19
  %53 = getelementptr inbounds {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %arrayptr74128, i64 %51, !dbg !947
  %arrayref75 = load {} addrspace(10)*, {} addrspace(10)* addrspace(13)* %53, align 8, !dbg !947, !tbaa !179, !alias.scope !47, !noalias !50
  %.not129 = icmp eq {} addrspace(10)* %arrayref75, null, !dbg !947
  br i1 %.not129, label %fail, label %pass, !dbg !947

fail:                                             ; preds = %idxend72
  call void @llvm.lifetime.end.p0i8(i64 noundef 8, i8* noundef nonnull %5) #38
  call void @ijl_throw({} addrspace(12)* noundef addrspacecast ({}* inttoptr (i64 140731428201824 to {}*) to {} addrspace(12)*)) #40, !dbg !947
  unreachable, !dbg !947

pass:                                             ; preds = %idxend72
  call void @llvm.lifetime.end.p0i8(i64 noundef 8, i8* noundef nonnull %5) #38
  call void @ijl_array_del_end({} addrspace(10)* noundef nonnull %getfield, i64 noundef 1) #38, !dbg !949
  br label %L117, !dbg !951

err77:                                            ; preds = %L121
  call void @ijl_undefined_var_error({} addrspace(12)* noundef addrspacecast ({}* inttoptr (i64 1587490886312 to {}*) to {} addrspace(12)*)) #40, !dbg !935      
  unreachable, !dbg !935

ok78:                                             ; preds = %L121
  ret void, !dbg !952
}

No augmented forward pass found for ijl_gc_get_total_bytes
 at context:   call void @ijl_gc_get_total_bytes(i64 noundef %bitcast_coercion) #38 [ "jl_roots"({} addrspace(10)* null) ], !dbg !70

Stacktrace:
 [1] gc_bytes
   @ .\timing.jl:401
 [2] gc_bytes
   @ C:\Users\accou\.julia\packages\TimerOutputs\Lw5SP\src\TimerOutputs.jl:15
 [3] macro expansion
   @ C:\Users\accou\.julia\packages\TimerOutputs\Lw5SP\src\TimerOutput.jl:235
 [4] f
   @ c:\Users\accou\OneDrive\Computer\Desktop\test.jl:9


Stacktrace:
 [1] throwerr(cstr::Cstring)
   @ Enzyme.Compiler C:\Users\accou\.julia\packages\Enzyme\wg4P7\src\compiler.jl:1539

@ChrisRackauckas
Copy link
Contributor Author

Looking at the message:

ijl_apply_generic at /cache/build/builder-amdci5-1/julialang/julia-release-1-dot-10/src/gf.c:3076

it looks indeed like it might be the same thing, just Enzyme got better at not segfaulting.

@wsmoses
Copy link
Member

wsmoses commented Jun 16, 2024 via email

@wsmoses
Copy link
Member

wsmoses commented Jun 23, 2024

@ChrisRackauckas your micro test works on Enzyme main.

What is the status of the bigger case?

@ChrisRackauckas
Copy link
Contributor Author

I think this solved it. I'll reopen if that test was done wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants