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

[docs] Updating template

parent 41774a0a
No related branches found
No related tags found
No related merge requests found
......@@ -89,43 +89,6 @@ Once ``Makefile.config`` has been created, we can build one of the benchmarks. L
Your own project
----------------
See `template <https://gitlab.engr.illinois.edu/llvm/hpvm-release/-/tree/main/hpvm/test/benchmarks/general_benchmarks/template>`__ for an example Makefile and config. Include
``heterocc.h`` to use the HeteroC++ api functions (found in
``include/heterocc.h``).
Now that we have built HPVM, the next step is to build and run a benchmark. For this, the first step is to create the required ``Makefile.config`` file in the ``hpvm/benchmarks/include`` directory. This can be done by copying the existing ``Makefile.config.example`` under ``hpvm/benchmarks/include`` and filling in the required paths for ``CUDA_PATH`` and ``OPENCL_PATH`` to point to the CUDA and OpenCL libraries in your system.
Once ``Makefile.config`` has been created, we can build one of the benchmarks. Let us demonstrate using the Edge Detection Pipeline benchmark ``pipeline`` located under ``hpvm/benchmarks/general_benchmarks/pipeline``. Once in the benchmark folder we can compile the benchmark for different targets as follows:
* To compile and run the benhcmark on CPU:
.. code-block:: shell
make TARGET=seq
make TARGET=seq run
* To compile and run the benchmark on GPU (note that this will require having an NVIDIA GPU and the NVIDIA OpenCL runtime installed):
.. code-block:: shell
make TARGET=gpu
make TARGET=gpu run
* To compile and run the benchmark on an Intel FPGA (this will require having an Intel FPGA with OpenCL Support and the Intel FPGA SDK for OpenCL installed):
* For FPGA we can first run the benchmark in emulation to verify its functionality:
.. code-block:: shell
# This is required to ensure that the Intel FPGA emulator
# does not spawn too many threads
export OCL_TBB_NUM_WORKERS=<N>
make TARGET=fpga EMULATION=1
make TARGET=fpga EMULATION=1 run
* Once functionality has been verified and when we are ready to synthesize the FPGA design, we can run a full compilation. Note that this will take a few hours to complete:
.. code-block:: shell
make TARGET=fpga
make TARGET=fpga run
See `template <https://gitlab.engr.illinois.edu/llvm/hpvm-release/-/tree/main/hpvm/test/benchmarks/general_benchmarks/template>`__ for an example Makefile that you can use in your own project. As with the benchmarks, make sure ``Makefile.config`` is created as described above. In your makefile, you will need to specify the HPVM source file (i.e. the one that contains the HPVM DFG), any other source files that need to be linked in, the name of your application executable, and any linker and include flags. Make sure you include
``heterocc.h`` in your C/C++ project files to use the HeteroC++ api functions (found in
``include/heterocc.h``).
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