We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b773d9f commit cfcfaaeCopy full SHA for cfcfaae
src/Enzyme.jl
@@ -69,6 +69,20 @@ end
69
return Base.zero(x)
70
end
71
72
+@inline function Enzyme.tupstack(
73
+ data::Tuple{Vararg{<:Reactant.RArray{T}}},
74
+ outshape::Tuple{Vararg{Int}},
75
+ inshape::Tuple{Vararg{Int}},
76
+) where {T}
77
+ res = similar(first(data), outshape..., inshape...)
78
+ c = CartesianIndices(outshape)
79
+ tail_dims = map(Returns(:), inshape)
80
+ for (i, val) in enumerate(data)
81
+ @inbounds res[c[i], tail_dims...] = val
82
+ end
83
+ return res
84
+end
85
+
86
macro register_make_zero_inplace(sym)
87
quote
88
@inline function $sym(prev::RArray{T,N})::Nothing where {T<:AbstractFloat,N}
0 commit comments