diff --git a/accelerate.cabal b/accelerate.cabal index 81f8ced61..c4a8c0d75 100644 --- a/accelerate.cabal +++ b/accelerate.cabal @@ -624,7 +624,7 @@ test-suite tom-test hs-source-dirs: test/tom main-is: Main.hs other-modules: ADHelp, Logistic, Optimise, Neural, LSTM, ConvNet, - Playground.Neural, Neural.Help + Playground.Neural, Playground.Fusion, Neural.Help build-depends: base >= 4.10 diff --git a/test/tom/Playground/Fusion.hs b/test/tom/Playground/Fusion.hs new file mode 100644 index 000000000..82ed6ae91 --- /dev/null +++ b/test/tom/Playground/Fusion.hs @@ -0,0 +1,20 @@ +module Playground.Fusion where + +-- import qualified Prelude as P +import Prelude (IO, print) +import Data.Array.Accelerate + + +main :: IO () +main = do + print inputProgram + +inputProgram :: Acc (Scalar Float) +inputProgram = + let arr = use (fromList Z [1 :: Float]) + in zipWith + (\x _ -> x) + (generate Z_ (\_ -> 1 :: Exp Float)) + (zipWith (\x y -> T2 x y) + (map (\x -> x) arr) + (map (\x -> x) arr))