-
Yifan Zhao authoredYifan Zhao authored
index.rst 1.69 KiB
Components
HPVM consists of a few relatively independent key components.
- Patched LLVM: provides HPVM IR and a compilation infrastructure, including
clang
andopt
. - HPVM code generator: a few
opt
passes that lowers HPVM IR to LLVM IR, which is then compiled into object code and binary.
:doc:`Compilation process of HPVM </specifications/hpvm-spec>` shows how these 2 components work together. In addition, there are:
- Frontends (Keras/PyTorch): code generators in Python for lowering Keras and PyTorch DNN models into HPVM-C format.
- Predictive tuner: an autotuner library in Python for finding approximation choices (configurations) with best performance gain within some loss of Quality of Service (QoS, such as accuracy).
- HPVM profiler: an API in Python for measuring real performance of configurations.
- Tensor runtime: a backend which holds implementations for some common tensor operators (such as convolution) that HPVM-C functions can be converted into.
The interaction between these components is illustrated in this figure:
The documentation of these components are listed below, which explains their role, usage, and other details.
Tests and Benchmarks
HPVM provides a number of general benchmarks (written in HPVM-C), DNN benchmarks, and test cases testing the components listed above. See this for more details on these tests and benchmarks: