hqjenny-centrifuge/workloads
Jenny Huang 2f9b8ea121 Move the bm to the hardcoded bm 2023-08-07 18:19:49 -07:00
..
bm Move the bm to the hardcoded bm 2023-08-07 18:19:49 -07:00
cf-base hardcoded vadd example works (vadd.json) 2019-11-05 02:29:07 +00:00
hardcoded update 2023-05-15 17:57:20 -07:00
.gitignore hardcoded vadd example works (vadd.json) 2019-11-05 02:29:07 +00:00
README.md Fix typo in hardcoded README 2019-11-05 03:55:12 +00:00
cf-buildroot.json hardcoded vadd example works (vadd.json) 2019-11-05 02:29:07 +00:00
vadd_rocc.json add vadd_rocc.json workload and cleanup some naming on vadd. 2019-11-05 02:55:26 +00:00
vadd_tl.json add vadd_rocc.json workload and cleanup some naming on vadd. 2019-11-05 02:55:26 +00:00

README.md

FireMarshal Workloads for Centrifuge

Hardcoded Linux Examples

The hardcoded/ directory contains a number of hand-written benchmarks for linux that use various centrifuge-generated accelerators. Most can be built simply by running make in their respective directories. However, to actually use the benchmark you will need add it to a linux-based workload (i.e. kernel + root filesystem). The FireMarshal tool (included with chipyard) helps automate this process.

Vadd Example Quickstart

If you simply want to try out the example vector add workload, you can use the following commands:

First, build the workload

../../tools/firemarshal/marshal build vadd_tl.json vadd_rocc.json

This command builds two Linux-based workloads that can be booted on a RISC-V SoC. They include a simple test that uses the vector addition accelerators that were generated by centrifuge.

Next, you will want to install them:

../../tools/firemarshal/marshal install vadd_tl.json vadd_rocc.json

This generates a FireSim workload description for the provided benchmarks. You may now use FireSim normally to launch the workloads. They will simply run the benchmark automatically and shutdown (you do not need to interact with the running workload at all).

FireMarshal Workload Description Details

vadd_tl.json and vadd_rocc.json are FireMarshal workload descriptions. These include all the information needed to build a working Linux-based benchmark. Here is the workload description for the tilelink-based accelerator:

{
  "name" : "vadd_tl",
  "base" : "cf-buildroot.json",
  "workdir" : "hardcoded/vadd_tl",
  "host-init" : "build.sh",
  "files" : [["vadd_tl", "/root/"]],
  "command" : "/root/vadd_tl"
}

These options have the following effects:

  • name: A unique name identifying this benchmark.
  • base: We have provided you with a base workload that includes the necessary changes to Linux and other common setup tasks. FireMarshal inherits this configuration before building your workload.
  • workdir: All file paths in this configuration file will be relative to this directory
  • host-init: This script is run automatically before constructing the Linux root filesystem. In this case, hardcoded/vadd_tl/build.sh simply cross-compiles the vector add example benchmark.
  • files: This instructs FireMarshal to copy the benchmark into the target root filesystem.
  • command: FireMarshal will configure the workload to automatically run this command whenver it boots up. This allows for hands-free testing.

You can find more information on FireMarshal workloads in its documentation.