Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt committed Oct 4, 2024
1 parent 74f0c88 commit f6d8b7d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ext/MooncakeCUDAExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,13 @@ end
# Basic rules for operating on CuArrays.

@is_primitive(
MinimalCtx,
Tuple{Type{<:CuArray}, UndefInitializer, Vararg{Int, N}} where {N},
MinimalCtx, Tuple{Type{<:CuArray}, UndefInitializer, Vararg{Int, N}} where {N},
)
function rrule!!(
p::CoDual{Type{P}},
init::CoDual{UndefInitializer},
dims::CoDual{Int}...
p::CoDual{Type{P}}, init::CoDual{UndefInitializer}, dims::CoDual{Int}...
) where {P<:CuArray{<:Base.IEEEFloat}}
_dims = map(primal, dims)
y = CoDual(P(undef, _dims), P(undef, _dims))
return y, NoPullback(p, init, dims...)
return CoDual(P(undef, _dims), P(undef, _dims)), NoPullback(p, init, dims...)
end

end

0 comments on commit f6d8b7d

Please sign in to comment.