Skip to content
Snippets Groups Projects
Commit bb2eaaff authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Updated requirements and some more

parent 17c8d30d
No related branches found
No related tags found
No related merge requests found
...@@ -4,26 +4,30 @@ Install ...@@ -4,26 +4,30 @@ Install
Dependencies Dependencies
------------ ------------
The following components are required to be installed on your machine to build HPVM. * The following components are mandatory for building HPVM:
* GCC (>=5.1) * GCC (>=5.1)
* In addition, each version of CUDA-nvcc requires GCC to be not newer than a certain version. * CMake (>=3.17)
See `here <https://gist.github.com/ax3l/9489132>`_ for the support matrix.
* CMake (>=3.17) * GNU Make (>=3.79) or Ninja (>=1.10)
* GNU Make (>=3.79) * Python (>=3.6) with pip (>=20)
* OpenCL (>=1.0.0) * Python must be strictly 3.6 (any subversion from 3.6.0 to 3.6.13).
* CUDA (>=9.0, <=10.2) with CUDNN 7 * OpenCL (>=1.0.0) is required for compiling HPVM-C code on GPU; otherwise, only CPU is available.
* CUDNN 7 is unsupported beyond CUDA 10.2 (starting from CUDA 11) * The following components are required to build support for Tensor-domain applications
introduced in `ApproxHPVM <https://dl.acm.org/doi/10.1145/3360612>`_:
* Python (==3.6) with pip (>=20) * CUDA (>=9.0, <=10.2) with CUDNN 7
* CUDNN 7 is unsupported beyond CUDA 10.2 (starting from CUDA 11)
* In addition, each version of CUDA-nvcc requires GCC to be not newer than a certain version.
See `here <https://gist.github.com/ax3l/9489132>`_ for the support matrix.
* Python must be strictly 3.6 (any subversion from 3.6.0 to 3.6.13).
Python Environment Python Environment
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
...@@ -34,7 +38,7 @@ as HPVM will install a few Python packages during this installation process. ...@@ -34,7 +38,7 @@ as HPVM will install a few Python packages during this installation process.
* Some HPVM Python packages contains executables. If you don't use a virtual environment, * Some HPVM Python packages contains executables. If you don't use a virtual environment,
these executables are installed to your local ``bin`` directory, usually ``$HOME/.local/bin``. these executables are installed to your local ``bin`` directory, usually ``$HOME/.local/bin``.
Please ensure this directory is in your `$PATH` variable. Please ensure this directory is in your `$PATH` variable.
Below it is assumed that these executables are visible throught `$PATH`. Below it is assumed that these executables are visible through `$PATH`.
If you use Anaconda for package management, If you use Anaconda for package management,
we provide a conda environment file that covers all Python and package requirements we provide a conda environment file that covers all Python and package requirements
...@@ -91,10 +95,10 @@ the directory ``hpvm/projects/predtuner`` should be empty, ...@@ -91,10 +95,10 @@ the directory ``hpvm/projects/predtuner`` should be empty,
which can be fixed with ``git submodule update --recursive --init``. which can be fixed with ``git submodule update --recursive --init``.
HPVM needs to be able to find CUDA. HPVM needs to be able to find CUDA.
If CUDA is installed in your system's $PATH (e.g. if it was installed at the default location), If CUDA is installed in your system's `$PATH` (e.g. if it was installed at the default location),
HPVM can find CUDA automatically. HPVM can find CUDA automatically.
Use HPVM installer script to download, configure and build HPVM along with LLVM and Clang: Use HPVM installer script to download extra components, configure and build HPVM:
.. code-block:: shell .. code-block:: shell
...@@ -104,8 +108,8 @@ Use HPVM installer script to download, configure and build HPVM along with LLVM ...@@ -104,8 +108,8 @@ Use HPVM installer script to download, configure and build HPVM along with LLVM
Alternatively, use ``./install.sh -h`` for a list of available arguments Alternatively, use ``./install.sh -h`` for a list of available arguments
and pass arguments as required. and pass arguments as required.
* ``./install.sh`` supports Ninja, a substitute of Make that is considered to build faster * ``./install.sh`` supports `Ninja <https://ninja-build.org/>`_,
on many IO-bottlenecked devices. a substitute of Make that is considered to build faster on many IO-bottlenecked devices.
Passing ``--ninja`` to the installer tells it to use Ninja instead of Make. Passing ``--ninja`` to the installer tells it to use Ninja instead of Make.
* ``./install.sh`` can relay additional arguments to CMake, but the dash must be dropped * ``./install.sh`` can relay additional arguments to CMake, but the dash must be dropped
...@@ -122,14 +126,33 @@ Use HPVM installer script to download, configure and build HPVM along with LLVM ...@@ -122,14 +126,33 @@ Use HPVM installer script to download, configure and build HPVM along with LLVM
After configuring HPVM, After configuring HPVM,
the installer will also compile HPVM by default, which you can opt out of. the installer will also compile HPVM by default, which you can opt out of.
(You can see this option in both the prompt and the ``-h`` help menu.)
If you do so, follow the next section "Manually Build HPVM" to manually compile HPVM, If you do so, follow the next section "Manually Build HPVM" to manually compile HPVM,
and "Benchmarks and Tests" to manually run test cases if you wish so. and "Benchmarks and Tests" to manually run test cases if you wish so.
Otherwise, you can skip the next 2 sections. Otherwise, you can skip the next 2 sections.
* Specifically, the HPVM installer downloads LLVM, and Clang, copies HPVM source into How Does the Installer Work
llvm/tools and builds the entire tree. It also builds a modified LLVM C-Backend, ^^^^^^^^^^^^^^^^^^^^^^^^^^^
based on the one maintained by `Julia Computing <https://github.com/JuliaComputing/llvm-cbe>`_,
as a part of HPVM and is currently used to generate OpenCL kernels for GPUs. The HPVM installer performs the following tasks:
* downloads and decompresses LLVM and Clang into `hpvm/llvm`,
* links HPVM source code into ``hpvm/llvm/tools/hpvm``,
* downloads DNN model parameters to ``test/dnn_benchmarks/model_params`` (this step is optional -- you can opt out of it),
* installs a few Python packages: the PyTorch frontend, the Keras frontend, the predictive tuner,
and the HPVM profiler, (this step is optional),
* builds the entire HPVM which provides `hpvm-clang`, HPVM's main compilation interface,
* The build system builds HPVM, creates a Python package `hpvmpy` (which provides the binary `hpvm-clang`)
*on the fly*, and installs it to your current Python environment.
* and finally, builds and runs some tests if you explicitly require so.
* While running tests is recommended, it is not turned on by default as it is very time-consuming.
TroubleShooting TroubleShooting
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
......
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