Skip to content

Commit

Permalink
Play around with fusion DCE bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmeding committed Oct 12, 2020
1 parent 7aab1b5 commit a97c30c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion accelerate.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions test/tom/Playground/Fusion.hs
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit a97c30c

Please sign in to comment.