Skip to content

Commit

Permalink
Update sugar apis (#1844)
Browse files Browse the repository at this point in the history
* Update sugar apis

* cleanup

* cleanup

* cleanup

* fix

* fix

* fix stack

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Update internal_rules.jl

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
  • Loading branch information
wsmoses authored Sep 17, 2024
1 parent bd5dcd1 commit 786a998
Show file tree
Hide file tree
Showing 5 changed files with 609 additions and 495 deletions.
2 changes: 2 additions & 0 deletions ext/EnzymeStaticArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module EnzymeStaticArraysExt
using StaticArrays
using Enzyme

@inline Enzyme.tupstack(rows::(NTuple{N, <:StaticArrays.SArray} where N), inshape, outshape) = reshape(cat(rows..., dims=length(inshape)), (inshape..., outshape...))

@inline function Enzyme.onehot(x::StaticArrays.SArray{S, T, N, L}) where {S, T, N, L}
ntuple(Val(L)) do i
Base.@_inline_meta
Expand Down
Loading

0 comments on commit 786a998

Please sign in to comment.