From 7333909ebce683e91905fd6359036358f4029dde Mon Sep 17 00:00:00 2001 From: Tammy Yang Date: Wed, 23 Sep 2015 14:58:00 +0800 Subject: [PATCH 1/4] small modification to the Makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index de6db1d..fdefa71 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ all: translator pylib translator: cabal_hack # Build - cd ${translator} && cabal configure --enable-shared && cabal build + cd ${translator} && cabal configure --enable-shared && cabal build -v2 + # Copy binary files mkdir -p bin - # cp ${translator}/dist/build/libHS${translator}*.a bin/${translator}.a - cp ${translator}/dist/build/libHS${translator}*.dylib bin/${translator}.so + cp ${translator}/dist/build/libHS${translator}*.so bin/${translator}.so cabal_hack: # We have to manually link the runtime library in cabal for some reason. From 10d16f09615fcae64d7dcb2df5236b4061f52501 Mon Sep 17 00:00:00 2001 From: Tammy Yang Date: Wed, 23 Sep 2015 15:18:55 +0800 Subject: [PATCH 2/4] modify README.md to add guidelines for building and installation --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 4ee7379..3fb9431 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,29 @@ Here is the Mandelbrot image: ![Mandel](http://418.oulgen.com/img/mandel.png) +# Building and Installation + +1. The suggested version of ghc is 7.8.3, you can find it from [here](https://www.haskell.org/ghc/download). +2. Make sure the external dependencies are satisfied +⋅⋅* Ubuntu 14.04 and later versions +```{r, engine='bash', count_lines} +sudo apt-get install cabal-install happy alex haskell-platform ghc-dynamic python-setuptools +``` +3. Make sure the dependencies are installed properly using [cabal](https://wiki.haskell.org/Cabal-Install) +```{r, engine='bash', count_lines} +cd py2cuda +cabal install --only-dependencies +cd - +``` +4. Build it! +5. The resulting Python egg file will be placed in bin/. Install them properly or add the following three lines to your Python codes if you just want to make some test: +```python +import sys +sys.path.append("$PATH_OF_CudaPy/bin/cudapy.egg") +import cudapy +``` + + # Related Work We got our inspiration for CudaPy form a system called VecPy. VecPy was last year's winner at [15-418 Parallelism competition](http://15418.courses.cs.cmu.edu/spring2014/competition). As in its creator's words, VecPy "leverages multi-threading and SIMD instructions on modern x86 processors." CudaPy goes in a different direction and adds GPU level parallelism. We also have a less strict type system: VecPy compiles code for a single type like `int` or `float` where as CudaPy kernels can take an arbitrary signature of base types (these include `void`, `bool`, `int`, `float`, `double`, and possibly nested arrays on these types). Finally, CudaPy had some extra challenges VecPy did not have such as handling separate device and host memory, and interfacing with the CUDA runtime. From 6d7554cd5f8f8d2ee2abeef6837af8185a271938 Mon Sep 17 00:00:00 2001 From: Tammy Yang Date: Wed, 23 Sep 2015 15:26:05 +0800 Subject: [PATCH 3/4] fix a minor bug in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3fb9431..0884f6f 100644 --- a/README.md +++ b/README.md @@ -218,11 +218,11 @@ Here is the Mandelbrot image: ![Mandel](http://418.oulgen.com/img/mandel.png) -# Building and Installation +# Building and Installing 1. The suggested version of ghc is 7.8.3, you can find it from [here](https://www.haskell.org/ghc/download). 2. Make sure the external dependencies are satisfied -⋅⋅* Ubuntu 14.04 and later versions + * For Ubuntu 14.04 and later versions ```{r, engine='bash', count_lines} sudo apt-get install cabal-install happy alex haskell-platform ghc-dynamic python-setuptools ``` From a4891fe3234eb2de051fa94321c4a5bd266c2054 Mon Sep 17 00:00:00 2001 From: Tammy Yang Date: Wed, 23 Sep 2015 15:28:45 +0800 Subject: [PATCH 4/4] use bullets instead of lists --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0884f6f..760ae9a 100644 --- a/README.md +++ b/README.md @@ -220,20 +220,20 @@ Here is the Mandelbrot image: # Building and Installing -1. The suggested version of ghc is 7.8.3, you can find it from [here](https://www.haskell.org/ghc/download). -2. Make sure the external dependencies are satisfied +* The suggested version of ghc is 7.8.3, you can find it from [here](https://www.haskell.org/ghc/download). +* Make sure the external dependencies are satisfied * For Ubuntu 14.04 and later versions ```{r, engine='bash', count_lines} sudo apt-get install cabal-install happy alex haskell-platform ghc-dynamic python-setuptools ``` -3. Make sure the dependencies are installed properly using [cabal](https://wiki.haskell.org/Cabal-Install) +* Make sure the dependencies are installed properly using [cabal](https://wiki.haskell.org/Cabal-Install) ```{r, engine='bash', count_lines} cd py2cuda cabal install --only-dependencies cd - ``` -4. Build it! -5. The resulting Python egg file will be placed in bin/. Install them properly or add the following three lines to your Python codes if you just want to make some test: +* Build it! +* The resulting Python egg file will be placed in bin/. Install them properly or add the following three lines to your Python codes if you just want to make some test: ```python import sys sys.path.append("$PATH_OF_CudaPy/bin/cudapy.egg")