Permalink
Browse files

Add script to generate cabal variants

  • Loading branch information...
rrnewton committed Jul 8, 2014
1 parent 7bae5d1 commit 36b2b277640b5eb4afdf347c0514b3d523c5808c
View
@@ -45,4 +45,6 @@ you will find in the HSBencher script run_benchmarks.hs.
+ * Radix - uses scan
+ * SMVM - uses segmented ops
@@ -1,16 +1,21 @@
-Name: localsearch-cuda
+Name: localsearch-cilk
Version: 0.0.0.1
Build-type: Simple
Cabal-version: >=1.10
-Executable bench-localsearch-cuda
+Executable bench-localsearch-cilk
Default-Language: Haskell2010
main-is: Main.hs
- hs-source-dirs: ../common
+ hs-source-dirs: ../common ../../common
ghc-options: -O2 -threaded -rtsopts
- cpp-options: -DACCBACKEND=Data.Array.Accelerate.Cilk
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.CILK
build-depends: base >= 4.7
, time, array >= 0.4, random
+ , mwc-random, vector >= 0.10
+ , bytestring >= 0.10, bytestring-lexing >= 0.4
, accelerate-backend-kit >= 0.15.0.4
, accelerate-icc-opencl >= 0.15.0.0
+ , accelerate-cuda >= 0.15.0.0
+ , accelerate-multidev >= 0.15.0.0
, accelerate >= 0.15.0.0
+ , cuda >= 0.5.1.1
@@ -6,12 +6,16 @@ Cabal-version: >=1.10
Executable bench-localsearch-cuda
Default-Language: Haskell2010
main-is: Main.hs
- hs-source-dirs: ../common
+ hs-source-dirs: ../common ../../common
ghc-options: -O2 -threaded -rtsopts
- cpp-options: -DACCBACKEND=Data.Array.Accelerate.CUDA
- cpp-options: -DNOSIMPLE
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.CUDA -DNOSIMPLE
build-depends: base >= 4.7
, time, array >= 0.4, random
+ , mwc-random, vector >= 0.10
+ , bytestring >= 0.10, bytestring-lexing >= 0.4
, accelerate-backend-kit >= 0.15.0.4
+ , accelerate-icc-opencl >= 0.15.0.0
, accelerate-cuda >= 0.15.0.0
+ , accelerate-multidev >= 0.15.0.0
, accelerate >= 0.15.0.0
+ , cuda >= 0.5.1.1
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+benchname=$1
+
+if [ "$benchname" == "" ]; then
+ echo "ERROR: must supply benchmark root name as first argument."
+ exit 1
+fi
+
+function doit() {
+ variant=$1
+ cleaned=`echo $variant | sed 's/_//'`
+ module=$2
+ shift; shift
+ rest=$*
+ fullname="$benchname-$cleaned"
+ dest=./$variant/"$fullname".cabal
+ rm -f $dest
+ mkdir -p ./$variant/
+ cat >> $dest <<EOF
+Name: $fullname
+Version: 0.0.0.1
+Build-type: Simple
+Cabal-version: >=1.10
+
+Executable bench-$fullname
+ Default-Language: Haskell2010
+ main-is: Main.hs
+ hs-source-dirs: ../common ../../common
+ ghc-options: -O2 -threaded -rtsopts
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.$module $rest
+ build-depends: base >= 4.7
+ , time, array >= 0.4, random
+ , mwc-random, vector >= 0.10
+ , bytestring >= 0.10, bytestring-lexing >= 0.4
+ , accelerate-backend-kit >= 0.15.0.4
+ , accelerate-icc-opencl >= 0.15.0.0
+ , accelerate-cuda >= 0.15.0.0
+ , accelerate-multidev >= 0.15.0.0
+ , accelerate >= 0.15.0.0
+ , cuda >= 0.5.1.1
+EOF
+}
+
+doit seq_c C
+doit cilk CILK
+doit cuda CUDA -DNOSIMPLE
+doit fission1 FissionExampleBackend
+doit fission2 FissionCUDA
+doit spmd1 SPMD_Example1 -DNOSIMPLE
+doit spmd2 SPMD_Example2
+doit cpugpu Multi_CPUGPU
+doit 2gpu Multi_2GPU -DEXTRAINITCUDA
+
+echo "All done generating .cabal files and directories."
@@ -0,0 +1,21 @@
+Name: localsearch-seqc
+Version: 0.0.0.1
+Build-type: Simple
+Cabal-version: >=1.10
+
+Executable bench-localsearch-seqc
+ Default-Language: Haskell2010
+ main-is: Main.hs
+ hs-source-dirs: ../common ../../common
+ ghc-options: -O2 -threaded -rtsopts
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.C
+ build-depends: base >= 4.7
+ , time, array >= 0.4, random
+ , mwc-random, vector >= 0.10
+ , bytestring >= 0.10, bytestring-lexing >= 0.4
+ , accelerate-backend-kit >= 0.15.0.4
+ , accelerate-icc-opencl >= 0.15.0.0
+ , accelerate-cuda >= 0.15.0.0
+ , accelerate-multidev >= 0.15.0.0
+ , accelerate >= 0.15.0.0
+ , cuda >= 0.5.1.1
@@ -1,17 +1,21 @@
Name: localsearch-spmd2
Version: 0.0.0.1
-Synopsis: Local Search benchmark running with an SPMD backend.
Build-type: Simple
Cabal-version: >=1.10
Executable bench-localsearch-spmd2
Default-Language: Haskell2010
main-is: Main.hs
- hs-source-dirs: ../common
+ hs-source-dirs: ../common ../../common
ghc-options: -O2 -threaded -rtsopts
- cpp-options: -DACCBACKEND=Data.Array.Accelerate.SPMD_Example2
+ cpp-options: -DACCBACKEND=Data.Array.Accelerate.SPMD_Example2
build-depends: base >= 4.7
, time, array >= 0.4, random
+ , mwc-random, vector >= 0.10
+ , bytestring >= 0.10, bytestring-lexing >= 0.4
, accelerate-backend-kit >= 0.15.0.4
+ , accelerate-icc-opencl >= 0.15.0.0
+ , accelerate-cuda >= 0.15.0.0
, accelerate-multidev >= 0.15.0.0
, accelerate >= 0.15.0.0
+ , cuda >= 0.5.1.1

0 comments on commit 36b2b27

Please sign in to comment.