@@ -44,17 +44,18 @@ EnzymeRules.inactive(::Type{StaticSize}, x...) = nothing
4444#  https://github.com/EnzymeAD/Enzyme.jl/issues/1516
4545#  On the CPU `autodiff_deferred` can deadlock.
4646#  Hence a specialized CPU version
47- function  cpu_fwd (ctx, f, args... )
48-     EnzymeCore. autodiff (Forward, Const (f), Const{Nothing}, Const (ctx), args... )
47+ function  cpu_fwd (ctx, config,  f, args... )
48+     EnzymeCore. autodiff (EnzymeCore . set_runtime_activity ( Forward, config) , Const (f), Const{Nothing}, Const (ctx), args... )
4949    return  nothing 
5050end 
5151
52- function  gpu_fwd (ctx, f, args... )
53-     EnzymeCore. autodiff_deferred (Forward, Const (f), Const{Nothing}, Const (ctx), args... )
52+ function  gpu_fwd (ctx, config,  f, args... )
53+     EnzymeCore. autodiff_deferred (EnzymeCore . set_runtime_activity ( Forward, config) , Const (f), Const{Nothing}, Const (ctx), args... )
5454    return  nothing 
5555end 
5656
5757function  EnzymeRules. forward (
58+ 	config,
5859        func:: Const{<:Kernel{CPU}} ,
5960        :: Type{Const{Nothing}} ,
6061        args... ;
@@ -65,10 +66,11 @@ function EnzymeRules.forward(
6566    f =  kernel. f
6667    fwd_kernel =  similar (kernel, cpu_fwd)
6768
68-     fwd_kernel (f, args... ; ndrange, workgroupsize)
69+     fwd_kernel (config,  f, args... ; ndrange, workgroupsize)
6970end 
7071
7172function  EnzymeRules. forward (
73+ 	config,
7274        func:: Const{<:Kernel{<:GPU}} ,
7375        :: Type{Const{Nothing}} ,
7476        args... ;
@@ -79,7 +81,7 @@ function EnzymeRules.forward(
7981    f =  kernel. f
8082    fwd_kernel =  similar (kernel, gpu_fwd)
8183
82-     fwd_kernel (f, args... ; ndrange, workgroupsize)
84+     fwd_kernel (config,  f, args... ; ndrange, workgroupsize)
8385end 
8486
8587_enzyme_mkcontext (kernel:: Kernel{CPU} , ndrange, iterspace, dynamic) = 
@@ -253,7 +255,7 @@ function gpu_rev(
253255end 
254256
255257function  EnzymeRules. augmented_primal (
256-         config:: Config ,
258+         config:: RevConfig ,
257259        func:: Const{<:Kernel} ,
258260        :: Type{Const{Nothing}} ,
259261        args:: Vararg{Any, N} ;
@@ -311,7 +313,7 @@ function EnzymeRules.augmented_primal(
311313end 
312314
313315function  EnzymeRules. reverse (
314-         config:: Config ,
316+         config:: RevConfig ,
315317        func:: Const{<:Kernel} ,
316318        :: Type{<:EnzymeCore.Annotation} ,
317319        tape,
364366#        synchronize rule and then synchronize where the launch was. However, with the current
365367#        kernel semantics this ensures correctness for now.
366368function  EnzymeRules. augmented_primal (
367-         config:: Config ,
369+         config:: RevConfig ,
368370        func:: Const{typeof(synchronize)} ,
369371        :: Type{Const{Nothing}} ,
370372        backend:: T ,
@@ -374,7 +376,7 @@ function EnzymeRules.augmented_primal(
374376end 
375377
376378function  EnzymeRules. reverse (
377-         config:: Config ,
379+         config:: RevConfig ,
378380        func:: Const{typeof(synchronize)} ,
379381        :: Type{Const{Nothing}} ,
380382        tape,
0 commit comments