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
function EnzymeRules.augmented_primal(config::Config, func::Const{<:Kernel{CUDABackend}}, type::Type{Const{Nothing}}, args::Vararg{Any, N}; ndrange=nothing, workgroupsize=nothing) where N
function EnzymeRules.forward(func::Const{<:Kernel}, ::Type{Const{Nothing}}, args...; ndrange=nothing, workgroupsize=nothing)
32
16
kernel = func.val
@@ -36,24 +20,6 @@ module EnzymeExt
36
20
fwd_kernel(f, args...; ndrange, workgroupsize)
37
21
end
38
22
39
-
@inlinefunctionmake_active_byref(f::F, ::Val{ActiveTys}) where {F, ActiveTys}
40
-
if!any(ActiveTys)
41
-
return f
42
-
end
43
-
functioninact(ctx, args2::Vararg{Any, N}) where N
44
-
args3 =ntuple(Val(N)) do i
45
-
Base.@_inline_meta
46
-
if ActiveTys[i]
47
-
args2[i][]
48
-
else
49
-
args2[i]
50
-
end
51
-
end
52
-
f(ctx, args3...)
53
-
end
54
-
return inact
55
-
end
56
-
57
23
function EnzymeRules.augmented_primal(config::Config, func::Const{<:Kernel{CPU}}, ::Type{Const{Nothing}}, args::Vararg{Any, N}; ndrange=nothing, workgroupsize=nothing) where N
0 commit comments