diff --git a/hpvm/test/README.md b/hpvm/test/README.md index 175d60ea63bdd8c428d3ec4d67d9329c7493322b..801af4c15a1832a467511804527e4e70043eb3df 100644 --- a/hpvm/test/README.md +++ b/hpvm/test/README.md @@ -1,4 +1,4 @@ -#Test Directory Organization +# Test Directory Organization The test directory is organized as follows: * unitTests: Includes unit tests for HPVM. * regressionTests: Includes regression tests for HPVM. diff --git a/hpvm/test/benchmarks/README.md b/hpvm/test/benchmarks/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0f227a2c34e815e80aeb03f4fc0090940a536517 --- /dev/null +++ b/hpvm/test/benchmarks/README.md @@ -0,0 +1,20 @@ +# Using HPVM +The below benchmarks are provided with HPVM, along with a template Makefile for user projects. + +In order to be able to build the existing benchmarks, a new `Makefile.config` must be created in [include](/hpvm/test/benchmarks/include) based on the existing `Makefile.config.example`. This configuration file must set up the following paths: +* LLVM_BUILD_DIR: should point to your local `build` directory of HPVM. +* HPVM_BENCH_DIR: should point to this benchmakrs directory. +* CUDA_PATH: should point to your local CUDA installation. + +## Parboil +Instructions to compile and run Parboil are provided in the following [README](/hpvm/test/benchmarks/parboil). + +## Harvard Camera Pipeline (HPVM-CAVA) +Instructions to compile and run HPVM-CAVA are provided in the following [README](/hpvm/test/benchmarks/hpvm-cava). + +## Edge Detection Pipeline +Instructions to compile and run Pipeline are provided in the following [README](/hpvm/test/benchmarks/pipeline). + +## Your own project +See `template/` for an example Makefile and config. +Include `hpvm.h` to use HPVM C api functions, found in the `include/hpvm.h`. diff --git a/hpvm/test/benchmarks/hpvm-cava/README.md b/hpvm/test/benchmarks/hpvm-cava/README.md index 4b8611fba7a8d8652dd084c7376307d8322c537a..0af7983dec3db9051a8516e0a2250ef12ae63dc8 100644 --- a/hpvm/test/benchmarks/hpvm-cava/README.md +++ b/hpvm/test/benchmarks/hpvm-cava/README.md @@ -15,4 +15,6 @@ After building HPVM, the following steps are required to build and run the camer * This processes the raw image `example-tulip-small/raw_tulip-small.bin`. Note that raw images are different from bitmaps, so you might need to obtain them using special software. * This generates: `tulip-small.bin` and `tulip-small-<stage>.bin` where `<stage>` represents the stage of the pipeline, in the directory `example-tulip-small`. 3. Convert the binary outputs to a PNG with `./convert.sh example-tulip-small`. + * The convert script uses some scripts in the `script` directory. These need to be compiled first using `cd ./scripts; make`. + * **In order to compile the convert scripts, the path to numpy should be set correctly in the makefile.** 4. View the resulting PNG at `example-tulip-small/tulip-small.png`. (As well as all the intermediary images for each stage `tulip-small-<stage>.png`). diff --git a/hpvm/test/benchmarks/hpvm-cava/scripts/Makefile b/hpvm/test/benchmarks/hpvm-cava/scripts/Makefile index f00acd3b62d71757b9fb8cd0a59e2af963675a6b..3b9bef9667943fa73849c5ce6747862301113937 100644 --- a/hpvm/test/benchmarks/hpvm-cava/scripts/Makefile +++ b/hpvm/test/benchmarks/hpvm-cava/scripts/Makefile @@ -5,15 +5,16 @@ IMAGE_NAME = $(basename $(IMAGE)) CXX = g++ CFLAGS = -c -fPIC -O2 -LFLAGS = -I/usr/include/python2.7/ -I/home/kotsifa2/.local/lib/python2.7/site-packages/numpy/core/include -#LFLAGS = -I/group/brooks/environments/gem5-aladdin-ubuntu/include/python2.7/ -I/group/brooks/environments/gem5-aladdin-ubuntu/lib/python2.7/site-packages/numpy/core/include + +# set local paths below +IFLAGS = -I/usr/include/python2.7/ -I/path/to/local/numpy/include all: ${PROGRAM} ${PROGRAM}: ${PROGRAM}.cc swig -python -o ${PROGRAM}_wrap.cc ${PROGRAM}.i $(CXX) ${CFLAGS} ${PROGRAM}.cc -o ${PROGRAM}.o - $(CXX) ${CFLAGS} ${PROGRAM}_wrap.cc -o ${PROGRAM}_wrap.o ${LFLAGS} + $(CXX) ${CFLAGS} ${PROGRAM}_wrap.cc -o ${PROGRAM}_wrap.o ${IFLAGS} $(CXX) -shared -o _${LIBRARY}.so *.o run: diff --git a/hpvm/test/regressionTests/BuildDFG/LeafInComingBindEdge.ll b/hpvm/test/regressionTests/BuildDFG/LeafInComingBindEdge.ll index 7ea6bbf056c2f5870ec4d0faa05fb74f55d50ece..8ce516e26e602762b0d5c0b89161290566ce75c0 100644 --- a/hpvm/test/regressionTests/BuildDFG/LeafInComingBindEdge.ll +++ b/hpvm/test/regressionTests/BuildDFG/LeafInComingBindEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -laod LLVMBuildDFG.so < %s +; RUN: opt -load LLVMBuildDFG.so < %s ; ModuleID = 'LeafBindEdge.ll' source_filename = "LeafBindEdge.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/BuildDFG/ThreeLevelEdge.ll b/hpvm/test/regressionTests/BuildDFG/ThreeLevelEdge.ll index d1b930b5298836a0c74f6d4eca8ffa0bb4aadb09..4e97523049d3fe86443d63849bc2013f472e9f2c 100644 --- a/hpvm/test/regressionTests/BuildDFG/ThreeLevelEdge.ll +++ b/hpvm/test/regressionTests/BuildDFG/ThreeLevelEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'ThreeLevelEdge.c' source_filename = "ThreeLevelEdge.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/BuildDFG/TwoLevel.ll b/hpvm/test/regressionTests/BuildDFG/TwoLevel.ll index e5b4c216813a161a95091aaedaab499e40e341e0..a84f52a33544cbc5250336ce7a439617661296d1 100644 --- a/hpvm/test/regressionTests/BuildDFG/TwoLevel.ll +++ b/hpvm/test/regressionTests/BuildDFG/TwoLevel.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'TwoLevel.c' source_filename = "TwoLevel.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/AllocationNode.ll b/hpvm/test/regressionTests/GenVISC/AllocationNode.ll index 30260eb6c0f67c7aa83ed6be626b820b0a463fe1..db5f3ebbfc76c9f1c49d6423dd81e555df770800 100644 --- a/hpvm/test/regressionTests/GenVISC/AllocationNode.ll +++ b/hpvm/test/regressionTests/GenVISC/AllocationNode.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'AllocationNode.c' source_filename = "AllocationNode.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/CreateNode.ll b/hpvm/test/regressionTests/GenVISC/CreateNode.ll index 5e4d10ac56a70670d6944a617c5b79714c356702..eac081b070e97087055f16c0a4626e08be03b235 100644 --- a/hpvm/test/regressionTests/GenVISC/CreateNode.ll +++ b/hpvm/test/regressionTests/GenVISC/CreateNode.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'CreateNode.c' source_filename = "CreateNode.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll b/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll index c61438e0a2cd5ef07ea50b1a9e31690327e33786..ae908f0fe99db01944d804ce7306f0b7e4fb05be 100644 --- a/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'CreateNodeAndEdge.c' source_filename = "CreateNodeAndEdge.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll b/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll index 3c0c1faaa3a986138cf6d54c438aea6a0faa696f..a17e489af5996e8e3c234ebd0ddfadd2780e6adf 100644 --- a/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'LeafBindEdge.c' source_filename = "LeafBindEdge.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll b/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll index ccb9540b9731f56466417b86dd1b8921b2056270..70ce0902a9067af3273557c42a88cecad5d19005 100644 --- a/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll +++ b/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'LeafNodeGetters.c' source_filename = "LeafNodeGetters.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/PopAndPush.ll b/hpvm/test/regressionTests/GenVISC/PopAndPush.ll index 43ce5bf16f258f66b7b4cec7e5b248c2388b5e0e..3d7f156e7f4f4e7d07f8aed9c00dcf65f5363059 100644 --- a/hpvm/test/regressionTests/GenVISC/PopAndPush.ll +++ b/hpvm/test/regressionTests/GenVISC/PopAndPush.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'PopAndPush.c' source_filename = "PopAndPush.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll b/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll index 41cec4575e9490f1237d759a6a9d74d871686fe5..d861e918887d796ea31c8169c15ae4cb3f71242f 100644 --- a/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll +++ b/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'ThreeLevel.c' source_filename = "ThreeLevel.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll b/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll index 5889afd2e78cd57554ea42d728117791aae104d4..4e97523049d3fe86443d63849bc2013f472e9f2c 100644 --- a/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'ThreeLevelEdge.c' source_filename = "ThreeLevelEdge.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll b/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll index 06d4d32f2a3f88fb64b2afbe95f4b5dfc952fd5e..cb7422a2402d0289c2851ac6bc5f03c69bc303ae 100644 --- a/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll +++ b/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'TwoLaunch.c' source_filename = "TwoLaunch.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/TwoLevel.ll b/hpvm/test/regressionTests/GenVISC/TwoLevel.ll index c6bbdcafa479ea5068b8de43e2509c15da054d9a..a84f52a33544cbc5250336ce7a439617661296d1 100644 --- a/hpvm/test/regressionTests/GenVISC/TwoLevel.ll +++ b/hpvm/test/regressionTests/GenVISC/TwoLevel.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'TwoLevel.c' source_filename = "TwoLevel.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll b/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll index 439dd30598e11ec5f2cb9548a5cadf0ef6fc5b64..efcf8f2b6b8bfb5ba77aa3b71c684e8560e41209 100644 --- a/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll +++ b/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'oneLaunchAlloca.c' source_filename = "oneLaunchAlloca.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll b/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll index 58960feefbbec51a35220d4d7c6b60f3f3f66078..78fdd9180b79815a1c0d1a077b8fc2a3fe7e57c7 100644 --- a/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll +++ b/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMHPVM.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMGenHPVM.so -S -genhpvm < %s | FileCheck %s ; ModuleID = 'oneLaunchMalloc.c' source_filename = "oneLaunchMalloc.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"