This is the HPVM port of the Mini-ERA workload.
Mini-ERA-HPVM Requirements:
- HPVM (internal repository branch
hpvm-epochs0
located here)- Refer to HPVM README for set up instructions. Note: During installation, make sure target is set to X86;RISCV to be able to target the EPOCHS-0 RISC-V processor.
- ApproxHPVM (internal repository branch
approx_hpvm_nvdla
located here.- Refer to ApproxHPVM README for set up instructions.
- GCC cross compiler for RISC-V, can be installed using ESP as follows:
- Clone ESP repository using:
git clone --recursive https://github.com/sld-columbia/esp.git
- Checkout the epochs branch:
cd esp && git checkout epochs
- Invoke the cross-compiler installation script:
./utils/scripts/build_riscv_toolchain.sh
- Clone ESP repository using:
Note: A pre-built version of the ESP libraries is provided in this repository.
git clone https://github.com/IBM/mini-era.git
cd mini-era
git checkout hpvm
In order to successfully build Mini-ERA, certain paths needs to set in the setup_paths.sh
script.
To do that, modify setup_paths.sh
to include the correct paths for the following variabls:
HPVM_DIR
should point to the HPVM repo:$(PATH_TO_HPVM_REPO)/hpvm
APPROXHPVM_DIR
should point to the ApproxHPVM repo:$(PATH_TO_APPROXHPVM_REPO)
RISCV_BIN_DIR
should point to the bin folder for the cross-compiler:$(PATH_TO_RISCV_TOOLCHAIN_BINARIES)
To build the HPVM version of Mini-ERA:
- After modifying the setup script as described above, source it using
source ./set_paths.sh
- Note: The scripts must be sourced using
source
because it sets up environment variables that will be needed by the Makefiles.
- Note: The scripts must be sourced using
- Build for desired target:
- For native architecture:
make
will generate the binaryminiera-hpvm-seq
- For epochs0 (risc-v host with fft, viterbi and NVLDA accelerators):
make epochs
will generate the binaryminiera-hpvm-epochs
- For all-software risc-v version:
make riscv
will generate the binaryminiera-hpvm-riscv
- For native architecture:
- To clean the build:
make clean
Notes:
- When building
riscv
andepochs
target, anld
error will appearing saying that the eh_table_hdr will not be created. This error can be ignored, the binary is still being generated. - The build must be cleaned before invoking make with a different target!
./miniera-hpvm-* -h
Usage: ./miniera-hpvm-* <OPTIONS>
OPTIONS:
-h : print this helpfule usage info
-o : print the Visualizer output traace information during the run
-t <trace> : defines the input trace file to use
-v <N> : defines Viterbi messaging behavior:
: 0 = One short message per time step
: 1 = One long message per time step
: 2 = One short message per obstacle per time step
: 3 = One long message per obstacle per time step
: 4 = One short msg per obstacle + 1 per time step
: 5 = One long msg per obstacle + 1 per time step
Trace-driven Mini-era requires the specification of the input trace (using -t <trace_file>) and also supports the specification of a message modeling behavior for the Viterbi kernel, using -v (where N is an integer). The corresponding behaviors are:
./main.exe -t <trace_name> (e.g. traces/test_trace1.new)
By using the -v behavior controls, one can simulate the Viterbi messaging work that could load the system when either operating with a single global (environmental) messsage model, with a pure swarm collaboration model (where each other nearby vehicle sends a message) and in a hybrid that includes both kinds of messaging. The message length also allows one to consider the effect of larger and small message payload decoding on the overall Viterbi run-time impact.
For more information about the Mini-ERA application, please visit the main IBM-Resaerch repository for the project: https://github.com/IBM/mini-era.