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
Description
For certain contrived inputs, fusion leaves unused program fragments in the output AST. It seems this can happen when a node was originally used, but due to expression simplification / fusion became unused.
Steps to reproduce
Print the following using show with Data.Array.Accelerate imported unqualified (and Prelude not imported)::
let arr = use (fromList Z [1::Float])
inzipWith
(\x _ -> x)
(generate Z_ (\_ ->1::ExpFloat))
(zipWith (\x y ->T2 x y)
(map (\x -> x) arr)
(map (\x -> x) arr))
The result is:
let
a0 = use (Scalar Z [1.0])
a1 = map (\x0 -> x0) a0
a2 = map (\x0 -> x0) a0
in
generate () (\() -> 1.0)
Note that none of a0, a1 and a2 are actually used.
Expected behaviour
The output was expected to be generate () (\() -> 1.0). :)
Your environment
Accelerate: 1.3.0.0; also 203a9271
Accelerate backend(s): n/a
GHC: 8.8.4
OS: Arch Linux
Additional context
AD again delivers in producing obscure code :)
The text was updated successfully, but these errors were encountered:
Description
For certain contrived inputs, fusion leaves unused program fragments in the output AST. It seems this can happen when a node was originally used, but due to expression simplification / fusion became unused.
Steps to reproduce
Print the following using
show
withData.Array.Accelerate
imported unqualified (andPrelude
not imported)::The result is:
Note that none of
a0
,a1
anda2
are actually used.Expected behaviour
The output was expected to be
generate () (\() -> 1.0)
. :)Your environment
203a9271
Additional context
AD again delivers in producing obscure code :)
The text was updated successfully, but these errors were encountered: