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
It would be nice to be able to use AD with Accelerate types (like Exp Double or Exp (Complex Double))
I think the big issues are:
A lot of typeclass methods on accelerate types result in bottoms. e.g.
instance P.Eq (Exp a) where
(==) = preludeError "Eq.==" "(==)"
(/=) = preludeError "Eq./=" "(/=)"
instance Ord a => P.Ord (Exp a) where
compare = error "Prelude.Ord.compare applied to EDSL types"
(<) = preludeError "Ord.<" "(<)"
(<=) = preludeError "Ord.<=" "(<=)"
(>) = preludeError "Ord.>" "(>)"
(>=) = preludeError "Ord.>=" "(>=)"
min = min
max = max
instance P.Enum (Exp a) where
toEnum = preludeError "toEnum"
fromEnum = preludeError "fromEnum"
instance (Num a, Ord a) => P.Real (Exp a) where
toRational = P.error "Prelude.toRational not supported for Accelerate types"
Accelerate appears to be very slow at compiling code with recursive functions. It seems better to iterate with Data.Array.Accelerate.while or Data.Array.Accelerate.iterate.
The text was updated successfully, but these errors were encountered:
It would be nice to be able to use AD with Accelerate types (like
Exp Double
orExp (Complex Double)
)I think the big issues are:
Data.Array.Accelerate.while
orData.Array.Accelerate.iterate
.The text was updated successfully, but these errors were encountered: