Skip to content
Snippets Groups Projects
Commit 1ede71fd authored by Adel Ejjeh's avatar Adel Ejjeh
Browse files

Merge branch 'hpvm-release-exp'

parents 3320f552 685d8e50
No related branches found
No related tags found
No related merge requests found
Pipeline #194098 passed
Showing
with 291 additions and 41 deletions
## HPVM Repository Structure
The current directory consists of the following sub-directories and files:
- `benchmarks` : This directory contains the benchmarks for the HPVM compiler infrastructure.
- `cmake`: Contains `cmake` related files which define additional variables needed to build `HPVM`.
- `docs`: Contains the documentation for `HPVM` and its various sub-projects. We use `Sphinx` for generating the reference documentation. A deployed version of the documentation can be found at https://hpvm.readthedocs.io/en/latest/.
- `include`: This directory contains the C++ headers for the `HPVM` compiler infrastructure.
- `lib`: This directory contains the C++ source files for the `HPVM` compiler infrastructure.
- `llvm_patches`: This directory contains the modified `LLVM` source files as well as a script to patch the corresponding source files in the `LLVM` source tree to enable building `HPVM`.
- `projects`: This directory contains the various sub-projects within `HPVM` which make use of the core `HPVM` infrastructure.
- `scripts`: Contains the script to build and install `HPVM` , and other utilities.
- `test`: Contains the automated `llvm-lit` tests for the various transformation passes in `HPVM`.
- `tools`: This directory contains the definition of various user-facing tools in `HPVM`.
- `env.yaml`: Defines the `Python` dependencies needed to support the `HPVM` Tensor Extensions.
- `install.sh`: Entry point script to build and install `HPVM`.
- `set_paths.sh`: Defines the various environment variables needed to build `HPVM` as well as it's sub-projects.
- `setup_environment.sh`: The script sets up the environment to use the `HPVM2FPGA` tool on Intel VLAB.
# HPVM Benchmarks
This directory contains benchmarks for the HPVM compiler infrastructure.
The `general_benchmarks/` directory contains benchmarks for the HPVM targets.
These programs are written in C/C++ with sections written in HPVM-C or
HeteroC++. These are intended to be compiled to the various HPVM targets (CPU,
GPU, FPGA). More details on these benchmarks and how to build and run them can
be found in the following
[README](/hpvm/benchmarks/general_benchmarks/README.md).
The `dnn_benchmarks/` directory contains benchmarks for HPVM's tensor
extensions and ApproxHPVM features.
DNN Benchmarks
========================
Directory Organization
----------------------
* ``dnn_benchmarks/keras`` contains these DNNs implemented in Keras,
and code for generating them down to HPVM-C (testing Keras frontend).
* ``dnn_benchmarks/pytorch`` contains these DNNs in PyTorch
and code for generating them down to HPVM-C (testing PyTorch/ONNX frontend).
* ``./dnn`` is a local package with these 10 DNNs implemented in PyTorch as examples.
This package is not installed with HPVM.
* ``./test_frontend`` contains tests on inference accuracy of code generated by the PyTorch frontend.
* ``./test_{profiling|tuning}`` contains tests on performing profiling/tuning
on frontend-generated binary.
* ``dnn_benchmarks/tensor-rt-src`` contains these DNNs directly implemented in `tensor_runtime`
functions. These are for reference purpose only and not actively used in the HPVM system or testing.
\ No newline at end of file
......@@ -2,7 +2,7 @@
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/benchmarks/general_benchmarks/include) based on the existing `Makefile.config.example`. This configuration file must set up the following paths:
In order to be able to build the existing benchmarks, a new `Makefile.config` must be created in [include](/hpvm/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, if available. Only required for GPU back end.
......@@ -33,22 +33,22 @@ As an example, if we wish to compile an application for the FPGA target, in Emul
make TARGET=fpga EMULATION=1 FPGAOPTS=LU,LF UF=4
```
## Parboil
Instructions to compile and run Parboil are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/parboil).
Instructions to compile and run Parboil are provided in the following [README](/hpvm/benchmarks/general_benchmarks/parboil).
## Machsuite
Instructions to compile and run Machsuite are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/machsuite).
Instructions to compile and run Machsuite are provided in the following [README](/hpvm/benchmarks/general_benchmarks/machsuite).
## Rodinia
Instructions to compile and run Rodinia are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/rodinia).
Instructions to compile and run Rodinia are provided in the following [README](/hpvm/benchmarks/general_benchmarks/rodinia).
## Harvard Camera Pipeline (HPVM-CAVA)
Instructions to compile and run HPVM-CAVA are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/hpvm-cava).
Instructions to compile and run HPVM-CAVA are provided in the following [README](/hpvm/benchmarks/general_benchmarks/hpvm-cava).
## Edge Detection Pipeline
Instructions to compile and run Pipeline are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/pipeline).
Instructions to compile and run Pipeline are provided in the following [README](/hpvm/benchmarks/general_benchmarks/pipeline).
## AudioEncoder Pipeline
Instructions to compile and run AudioEncoder Pipeline are provided in the following [README](/hpvm/test/benchmarks/general_benchmarks/audioPipelineEncodings).
Instructions to compile and run AudioEncoder Pipeline are provided in the following [README](/hpvm/benchmarks/general_benchmarks/audioPipelineEncodings).
## Your own project
See `template/` for an example Makefile.
......
# MachSuite Benchmarks
In this directory are several MachSuite benchmarks, ported to HPVM-C.
They can be compiled for CPU, GPU, and FPGA using the targets described in
this [README](/hpvm/benchmarks/general_benchmarks).
This benchmark suite is described in more detail in
[this paper](https://doi.org/10.1109/IISWC.2014.6983050) and the original
versions can be found [here](https://github.com/breagen/MachSuite/).
......@@ -24,7 +24,7 @@ ifeq ($(TARGET),seq)
HPVM_OPTFLAGS = -load HPVMBuildDFG.so -load HPVMDFG2LLVM_CPU.so -load HPVMClearDFG.so -dfg2llvm-cpu -clearDFG
else
DEVICE = GPU_TARGET
HPVM_OPTFLAGS = -load HPVMBuildDFG.so -load HPVMLocalMem.so -load HPVMDFG2LLVM_OpenCL.so -load HPVMDFG2LLVM_CPU.so -load HPVMClearDFG.so -localmem -dfg2llvm-opencl -dfg2llvm-cpu -clearDFG
HPVM_OPTFLAGS = -load HPVMBuildDFG.so -load HPVMLocalMem.so -load HPVMDFG2LLVM_GPU_OCL.so -load HPVMDFG2LLVM_CPU.so -load HPVMClearDFG.so -localmem -dfg2llvm-gpu-ocl -dfg2llvm-cpu -clearDFG
endif
CFLAGS += -DDEVICE=$(DEVICE)
......
......@@ -60,8 +60,8 @@ else ifeq ($(TARGET),fpga)
else ifeq ($(TARGET),gpu)
DEVICE = GPU_TARGET
DDEF = GPU
HPVM_OPTSO = -load HPVMBuildDFG.so -load HPVMLocalMem.so -load HPVMDFG2LLVM_OpenCL.so -load HPVMDFG2LLVM_CPU.so -load HPVMClearDFG.so
HPVM_OPTFLAGS = -localmem -dfg2llvm-opencl -dfg2llvm-cpu -clearDFG -hpvm-timers-cpu -hpvm-timers-ptx
HPVM_OPTSO = -load HPVMBuildDFG.so -load HPVMLocalMem.so -load HPVMDFG2LLVM_GPU_OCL.so -load HPVMDFG2LLVM_CPU.so -load HPVMClearDFG.so
HPVM_OPTFLAGS = -localmem -dfg2llvm-gpu-ocl -dfg2llvm-cpu -clearDFG -hpvm-timers-cpu -hpvm-timers-ptx
endif
ifeq ($(BASELINE),1)
......
build
gen_tutorials
/* Patches Sphinx-gallery CSS to hide download button */
div.sphx-glr-download {
display: none;
}
div.sphx-glr-download-link-note {
display: none;
}
/*
Sphinx-Gallery has compatible CSS to fix default sphinx themes
Tested for Sphinx 1.3.1 for all themes: default, alabaster, sphinxdoc,
scrolls, agogo, traditional, nature, haiku, pyramid
Tested for Read the Docs theme 0.1.7 */
.sphx-glr-thumbcontainer {
background: #fff;
border: solid #fff 1px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
box-shadow: none;
float: left;
margin: 5px;
min-height: 230px;
padding-top: 5px;
position: relative;
}
.sphx-glr-thumbcontainer:hover {
border: solid #b4ddfc 1px;
box-shadow: 0 0 15px rgba(142, 176, 202, 0.5);
}
.sphx-glr-thumbcontainer a.internal {
bottom: 0;
display: block;
left: 0;
padding: 5px 10px 0;
right: 0;
top: 0;
}
/* Next one is to avoid Sphinx traditional theme to cover all the
thumbnail with its default link Background color */
.sphx-glr-thumbcontainer a.internal:hover {
background-color: transparent;
}
.sphx-glr-thumbcontainer p {
margin: 0 0 .1em 0;
}
.sphx-glr-thumbcontainer figure {
margin: 10px;
width: 160px;
display: table;
}
.sphx-glr-thumbcontainer figcaption {
display: table-caption;
caption-side: bottom;
}
.sphx-glr-thumbcontainer img {
display: inline;
max-height: 112px;
max-width: 160px;
}
.sphx-glr-thumbcontainer[tooltip]:hover:after {
background: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
color: #fff;
content: attr(tooltip);
left: 95%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
bottom: 52%;
}
.sphx-glr-thumbcontainer[tooltip]:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 18px 0 0 20px;
bottom: 58%;
content: '';
left: 85%;
position: absolute;
z-index: 99;
}
.sphx-glr-script-out {
color: #888;
margin: 0;
}
p.sphx-glr-script-out {
padding-top: 0.7em;
}
.sphx-glr-script-out .highlight {
background-color: transparent;
margin-left: 2.5em;
margin-top: -2.1em;
}
.sphx-glr-script-out .highlight pre {
background-color: #fafae2;
border: 0;
max-height: 30em;
overflow: auto;
padding-left: 1ex;
margin: 0px;
word-break: break-word;
}
.sphx-glr-script-out + p {
margin-top: 1.8em;
}
blockquote.sphx-glr-script-out {
margin-left: 0pt;
}
.sphx-glr-script-out.highlight-pytb .highlight pre {
color: #000;
background-color: #ffe4e4;
border: 1px solid #f66;
margin-top: 10px;
padding: 7px;
}
div.sphx-glr-footer {
text-align: center;
}
div.sphx-glr-download {
margin: 1em auto;
vertical-align: middle;
}
div.sphx-glr-download a {
background-color: #ffc;
background-image: linear-gradient(to bottom, #FFC, #d5d57e);
border-radius: 4px;
border: 1px solid #c2c22d;
color: #000;
display: inline-block;
font-weight: bold;
padding: 1ex;
text-align: center;
}
div.sphx-glr-download code.download {
display: inline-block;
white-space: normal;
word-break: normal;
overflow-wrap: break-word;
/* border and background are given by the enclosing 'a' */
border: none;
background: none;
}
div.sphx-glr-download a:hover {
box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
text-decoration: none;
background-image: none;
background-color: #d5d57e;
}
.sphx-glr-example-title:target::before {
display: block;
content: "";
margin-top: -50px;
height: 50px;
visibility: hidden;
}
ul.sphx-glr-horizontal {
list-style: none;
padding: 0;
}
ul.sphx-glr-horizontal li {
display: inline;
}
ul.sphx-glr-horizontal img {
height: auto !important;
}
.sphx-glr-single-img {
margin: auto;
display: block;
max-width: 100%;
}
.sphx-glr-multi-img {
max-width: 42%;
height: auto;
}
div.sphx-glr-animation {
margin: auto;
display: block;
max-width: 100%;
}
div.sphx-glr-animation .animation{
display: block;
}
p.sphx-glr-signature a.reference.external {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
padding: 3px;
font-size: 75%;
text-align: right;
margin-left: auto;
display: table;
}
.sphx-glr-clear {
clear: both;
}
a.sphx-glr-backref-instance {
text-decoration: none;
}
hpvm/docs/_static/sphinx-gallery-default.png

26.2 KiB

......@@ -170,7 +170,8 @@ to correctly point to any required libraries, binaries, etc.
List of Tools Installed by HPVM
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A list and description fo the user-facing HPVM tools can be found :doc:`here </components/tools>`.
A list and description fo the user-facing HPVM tools can be found
:doc:`here <how_to_guides/user-facing-tools>`.
Full List of Installer Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
../../../projects/keras/docs/Support.rst
\ No newline at end of file
../../../test/README.rst
\ No newline at end of file
../../../projects/torch2hpvm/README.rst
\ No newline at end of file
......@@ -28,7 +28,7 @@ pygments_style = "sphinx"
project = "HPVM"
copyright = f"2020-{date.today().year}, University of Illinois"
exclude_patterns = ["tutorials/*.rst"]
exclude_patterns = []
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
......@@ -41,7 +41,6 @@ extensions = [
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_gallery.gen_gallery",
]
# Autosummary configuration
......@@ -68,14 +67,6 @@ intersphinx_mapping = {
"pytorch": ("https://pytorch.org/docs/stable", None),
}
# Sphinx gallery configuration
# ============================
sphinx_gallery_conf = {
"examples_dirs": ["./tutorials"],
"gallery_dirs": ["./gen_tutorials"],
"download_all_examples": False,
}
# Options for HTML output
# -----------------------
......@@ -98,7 +89,7 @@ html_static_path = ["_static"]
# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = ["hide_gallery_download.css"]
html_css_files = ["sg_gallery.css"]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
......
......@@ -463,7 +463,7 @@ codeGen(DFInternalNode* )
-------------------------
Internal Nodes are skipped in this backend pass.
DFG2LLVM_OpenCL
DFG2LLVM_GPU_OCL
^^^^^^^^^^^^^^^^^^^
Description
-----------
......@@ -513,7 +513,8 @@ Description
-----------
This backend generates FPGA kernel code and code for
launching kernels for the FPGA target using HPVM dataflow graph. The kernels are
generated into a separate file which gets converted to OpenCL using our :doc:`LLVM-to-OpenCL Tool</components/tools>`.
generated into a separate file which gets converted to OpenCL using our
:doc:`LLVM-to-OpenCL Tool</how_to_guides/user-facing-tools>`.
The pass begins by first creating a clone of the entire module, which will be used to generate the kernel code, and subsequently removing all global variables, functions, and global aliases from that clone. That cloned module’s Datalayout and Target Triple is updated accordingly.
......
......@@ -29,9 +29,9 @@ References
The HeteroC/C++ specification can be viewed at :doc:`/developerdocs/specifications/hetero-c`.
To view a simple HeteroC++ program through an example, refer to :doc:`/gen_tutorials/1-heterocpp`.
To view a simple HeteroC++ program through an example, refer to :doc:`/tutorials/1-heterocpp`.
For a more detailed tutorial on HeteroC++, please refer to :doc:`/developerdocs/writing-heteroc-program`.
For a more detailed tutorial on HeteroC++, please refer to :doc:`/how_to_guides/writing-heteroc-program`.
......
......@@ -3,7 +3,7 @@ HPVM Targets
There are three core back ends in the HPVM compiler. A CPU back end, a GPU back end, and an FPGA back end.
These back ends are separate from the tensor back ends which can also target the GPU, and which are described
under :doc:`Tensor Components </components/tensorcomponents/index>`. The three back ends are described below.
under :doc:`Tensor Components </developerdocs/components/tensorcomponents/index>`. The three back ends are described below.
HPVM CPU Back End
-----------------
......@@ -96,7 +96,7 @@ The output of the back end is the host module, which would still need to be
compiled using the CPU back end to generate the host binary, and the FPGA bistream that would program the FPGA.
Note that a user-facing tool, ``hpvm2fpga`` is provided with hpvm to run the FPGA backend seamlessly to the
user. Please refer to :doc:`User Facing Tools </components/tools>` for more information.
user. Please refer to :doc:`/how_to_guides/user-facing-tools` for more information.
LLVM-to-OpenCL Tool
-------------------
......
......@@ -4,7 +4,7 @@ HPVM Runtime System
The HPVM Runtime System handles interfacing with the appropriate device run time based on
what device is being used. The runtime system introduces unified methods that set up kernel
arguments, copy data between host and device, launch kernels, wait on kernels, etc. These
methods are used by the device back ends (described :doc:`here </components/corecomponents/hpvm-backends>`)
methods are used by the device back ends (described :doc:`here </developerdocs/components/corecomponents/hpvm-backends>`)
when performing code-generation. Internally, the runtime system interfaces with the
appropriate OpenCL runtime depending what target devices are being used during run time of
a given application.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment