Skip to content

Commit

Permalink
Readme and Install
Browse files Browse the repository at this point in the history
  • Loading branch information
oreiche committed Sep 1, 2018
1 parent f64b693 commit 93df2e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 39 deletions.
36 changes: 8 additions & 28 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
# Installation
Binary packages can be found [here](../../releases).
### On Ubuntu
Download the Debian package and run `sudo dpkg -i hipacc_<version>_amd64.deb`.
### On Windows
Download and run the installer `Hipacc-<version>-win64.exe`.
Download the Debian package and run `sudo dpkg -i hipacc-fpga_<version>_amd64.deb`.


# Run Samples
### On Ubuntu
Open a terminal and run:
```bash
cp -r /usr/local/hipacc/samples .
cp -r /usr/local/hipacc-fpga/samples .
cd samples/1_Local_Operators/Box_Blur
# Compile and run
make
# Compile and run for CUDA
make cuda
```
### On Windows
###### With Visual Studio 2015 and 2017
Navigate to sample directory `%HIPACC_PATH%\samples\1_Local_Operators\Box_Blur`,
open the project `sample.vcxproj`, and run build.

###### With Visual C++ Build Tools 2015
To run the samples without Visual Studio, install the latest **Windows SDK** and
**VC++ 2015 toolset** provided by
[Build Tools for Visual Studio 2017](https://aka.ms/buildtools).
Open PowerShell and run:
```PowerShell
cp -r "$Env:HIPACC_PATH\samples" .
cd .\samples\1_Local_Operators\Box_Blur
# Compile and run
.\make.bat
# Compile and run for CUDA
.\make.bat cuda
# Compile and run for Vivado HLS
make vivado
```


Expand All @@ -51,7 +31,7 @@ directory `<SRC>`:
cd <SRC>

# Get Hipacc
git clone https://github.com/hipacc/hipacc.git
git clone https://github.com/hipacc/hipacc-fpga.git

# Get libc++
git clone --branch <rev> http://llvm.org/git/libcxx.git
Expand All @@ -65,7 +45,7 @@ git clone --branch <rev> http://llvm.org/git/clang.git

# Apply patches if present
cd <SRC>/llvm/tools/clang
git apply <SRC>/hipacc/patches/clang-<rev>.patch
git apply <SRC>/hipacc-fpga/patches/clang-<rev>.patch
```

### Compile the Sources
Expand Down Expand Up @@ -117,7 +97,7 @@ make install
export PATH=<DST>/bin:$PATH

# Compile Hipacc
mkdir <SRC>/hipacc/build && cd <SRC>/hipacc/build
mkdir <SRC>/hipacc-fpga/build && cd <SRC>/hipacc-fpga/build
cmake .. -DCMAKE_INSTALL_PREFIX=<DST>
make install
```
Expand All @@ -141,7 +121,7 @@ cmake.exe .. -G "Visual Studio 14 2015 Win64" -T "LLVM-vs2014" -DCMAKE_INSTALL_P
cmake.exe --build . --target INSTALL
# Compile Hipacc
mkdir <SRC>\hipacc\build; cd <SRC>\hipacc\build
mkdir <SRC>\hipacc-fpga\build; cd <SRC>\hipacc-fpga\build
cmake.exe .. -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX="<DST>"
cmake.exe --build . --target INSTALL
```
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ As back ends, the framework supports C/C++, CUDA, OpenCL, and Renderscript.
# Install
See [Hipacc documentation](http://hipacc-lang.org/install.html) and [Install notes](INSTALL.md) for detailed information.

# Run Vivado HLS
# Run Samples

Make sure that the binary `vivado_hls` can be found in your `PATH` and run the
following commands in order to build provided test cases:

```bash
cd $(CMAKE_INSTALL_PREFIX)/tests/fpga
make vivado TEST_CASE=tests/laplace_rgba
make vivado TEST_CASE=tests/harris_corner
make vivado TEST_CASE=tests/optical_flow
make vivado TEST_CASE=tests/block_matching
```
Make sure that the binary `vivado_hls` can be found in your `PATH` and follow
the instructions [here](INSTALL.md#run-samples).

0 comments on commit 93df2e2

Please sign in to comment.