diff --git a/README.md b/README.md index 345db7ce2ab6cc4fda882f11c486eef214e7b8d2..0e16df5ea08c279305f16bcecb3373f87f8b16eb 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,13 @@ make install With all the aforementioned steps, HPVM should be built, installed and ready for use. ## Benchmarks and Tests -We are providing the following HPVM benchmarks: -* Select benchmarks from the [Parboil](http://impact.crhc.illinois.edu/parboil/parboil.aspx) benchmark suite, located under [test/parboil](/hpvm/test/benchmarks/parboil). -* An edge detection pipeline benchmark, located under [test/pipeline](/hpvm/test/benchmarks/pipeline). -* A Camera ISP pipeline, located under [test/cava](/hpvm/test/benchmarks/hpvm-cava), adapted from C code provided from our collaborators at [Harvard](http://vlsiarch.eecs.harvard.edu). +We are providing the following [HPVM benchmarks](/hpvm/test/benchmarks): +* Select benchmarks from the [Parboil](http://impact.crhc.illinois.edu/parboil/parboil.aspx) benchmark suite, located under [test/benchmarks/parboil](/hpvm/test/benchmarks/parboil). +* An edge detection pipeline benchmark, located under [test/benchmarks/pipeline](/hpvm/test/benchmarks/pipeline). +* A Camera ISP pipeline, located under [test/benchmarks/hpvm-cava](/hpvm/test/benchmarks/hpvm-cava), adapted from C code provided from our collaborators at [Harvard](http://vlsiarch.eecs.harvard.edu). + +Benchmark descriptions and instructions on how to compile and run them are [here](/hpvm/test/benchmarks). We are also providing [unit tests](/hpvm/test/unitTests) and [regression tests](/hpvm/test/regressionTests). -Benchmark descriptions and instructions on how to compile and run them are [here](/hpvm/test/benchmarks). + diff --git a/hpvm/docs/compilation.md b/hpvm/docs/compilation.md index f9a8b57209521bd632465b81273fbfe3a10fd000..8e68d00174b6fb63bfb647a0dbee1aa5dbd10b6a 100644 --- a/hpvm/docs/compilation.md +++ b/hpvm/docs/compilation.md @@ -4,12 +4,12 @@ Compilation of an HPVM program involves the following steps: 1. `clang` takes an HPVM-C/C++ program (e.g. `main.c`) and produces an LLVM IR (`main.ll`) file that contains the HPVM-C function calls. The declarations of these functions are defined in `test/benchmark/include/hpvm.h`, which must be included in the program. 2. `opt` takes (`main.ll`) and invoke the GenHPVM pass on it, which converts the HPVM-C function calls to HPVM intrinsics. This generates the HPVM textual representation (`main.hpvm.ll`). 3. `opt` takes the HPVM textual representation (`main.hpvm.ll`) and invokes the following passes in sequence: - * BuildDFG: Converts the textual representation to the internal HPVM representation. - * LocalMem and DFG2LLVM_NVPTX: Invoked only when GPU target is selected. Generates the kernel module (`main.kernels.ll`) and the portion of the host code that invokes the kernel into the host module (`main.host.ll`). - * DFG2LLVM_X86: Generates either all, or the remainder of the host module (`main.host.ll`) depending on the chosen target. - * ClearDFG: Deletes the internal HPVM representation from memory. + * BuildDFG: Converts the textual representation to the internal HPVM representation. + * LocalMem and DFG2LLVM_NVPTX: Invoked only when GPU target is selected. Generates the kernel module (`main.kernels.ll`) and the portion of the host code that invokes the kernel into the host module (`main.host.ll`). + * DFG2LLVM_X86: Generates either all, or the remainder of the host module (`main.host.ll`) depending on the chosen target. + * ClearDFG: Deletes the internal HPVM representation from memory. 4. `clang` is used to to compile any remaining project files that would be later linked with the host module. 5. `llvm-link` takes the host module and all the other generate `ll` files, and links them with the HPVM runtime module (`hpvm-rt.bc`), to generate the linked host module (`main.host.linked.ll`). 6. Generate the executable code from the generated `ll` files for all parts of the program: - * GPU target: `llvm-cbe` takes the kernel module (`main.kernels.ll`) and generates an OpenCL representation of the kernels that will be invoked by the host. - * X86 target: `clang` takes the linked host module (`main.host.linked.ll`) and generates the X86 binary. \ No newline at end of file + * GPU target: `llvm-cbe` takes the kernel module (`main.kernels.ll`) and generates an OpenCL representation of the kernels that will be invoked by the host. + * X86 target: `clang` takes the linked host module (`main.host.linked.ll`) and generates the X86 binary. 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/regressionTests/GenVISC/AllocationNode.ll b/hpvm/test/regressionTests/GenVISC/AllocationNode.ll index e3b2d81b943e109268cc2fe59c21d2d031fe8ab8..30260eb6c0f67c7aa83ed6be626b820b0a463fe1 100644 --- a/hpvm/test/regressionTests/GenVISC/AllocationNode.ll +++ b/hpvm/test/regressionTests/GenVISC/AllocationNode.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 72c3d110e2f8cbe554546bf2048a395b0437aad2..5e4d10ac56a70670d6944a617c5b79714c356702 100644 --- a/hpvm/test/regressionTests/GenVISC/CreateNode.ll +++ b/hpvm/test/regressionTests/GenVISC/CreateNode.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 a4e802f5cd3a355bc8fb05d2b70dafca0cc6c5f3..c61438e0a2cd5ef07ea50b1a9e31690327e33786 100644 --- a/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/CreateNodeAndEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 3f89f80c006065d7ee9d885181fd0c583023b2f8..3c0c1faaa3a986138cf6d54c438aea6a0faa696f 100644 --- a/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/LeafBindEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 523499eccb0ac2cef319b8975d8e750c9ff720d7..ccb9540b9731f56466417b86dd1b8921b2056270 100644 --- a/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll +++ b/hpvm/test/regressionTests/GenVISC/LeafNodeGetters.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 f21b072f5eac74a80b3dff135a54cbdb5cc67dfb..43ce5bf16f258f66b7b4cec7e5b248c2388b5e0e 100644 --- a/hpvm/test/regressionTests/GenVISC/PopAndPush.ll +++ b/hpvm/test/regressionTests/GenVISC/PopAndPush.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 aeb98403023c7ed2c739a348f2d732689f204d9f..41cec4575e9490f1237d759a6a9d74d871686fe5 100644 --- a/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll +++ b/hpvm/test/regressionTests/GenVISC/ThreeLevel.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 d1b930b5298836a0c74f6d4eca8ffa0bb4aadb09..5889afd2e78cd57554ea42d728117791aae104d4 100644 --- a/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll +++ b/hpvm/test/regressionTests/GenVISC/ThreeLevelEdge.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 36a61feb1cda410c2ea569bc778a1894da3f9b2b..06d4d32f2a3f88fb64b2afbe95f4b5dfc952fd5e 100644 --- a/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll +++ b/hpvm/test/regressionTests/GenVISC/TwoLaunch.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 e5b4c216813a161a95091aaedaab499e40e341e0..c6bbdcafa479ea5068b8de43e2509c15da054d9a 100644 --- a/hpvm/test/regressionTests/GenVISC/TwoLevel.ll +++ b/hpvm/test/regressionTests/GenVISC/TwoLevel.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 1c267469199270a372ce401d028f08bb5294cd6d..439dd30598e11ec5f2cb9548a5cadf0ef6fc5b64 100644 --- a/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll +++ b/hpvm/test/regressionTests/GenVISC/oneLaunchAlloca.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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 892049e67486f13a0c3585c3b4244d071c9834f8..58960feefbbec51a35220d4d7c6b60f3f3f66078 100644 --- a/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll +++ b/hpvm/test/regressionTests/GenVISC/oneLaunchMalloc.ll @@ -1,4 +1,4 @@ -; RUN: opt -load LLVMGenVISC.so -S -genhpvm < %s | FileCheck %s +; RUN: opt -load LLVMHPVM.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"