This repository holds everything behind the paper Deploying hls4ml neural networks on data-center FPGAs in a shared cluster (in preparation): the Kubernetes Job files, the predictions we wrote before each run, the raw measurements, and the scripts that turn them into the paper's numbers and figures.
In one paragraph. We ran about 90 hls4ml builds for the AMD Alveo U55C (and three for the Alveo U250) as
Kubernetes Jobs on the National Research Platform (NRP), on more than a dozen CPU types, and measured what each build cost: memory,
CPU, time, and how often it failed. We loaded every U55C bitstream onto a card and checked its outputs against
hls4ml's own predict. The designs are partly chosen by us and partly a random sample of 24 designs from the
wa-hls4ml exemplar set. Before each round of jobs we wrote down what we expected and committed it here, so every
result can be checked against a prediction made in advance.
Which version to use: the latest data-freeze-* tag. It contains all the data the paper uses.
| Question | Answer |
|---|---|
| How much memory does a build need? | 24.5–32.2 GiB of process memory at the peak of every link, for every model, reuse factor, precision and strategy, with four toolchains and on both cards; 33.4 GiB for a model using 71% of the U55C's DSPs. Larger designs peak a few GiB higher. 8 CPU and 40 Gi worked for every link. |
| When is memory highest? | In the first 4–50 minutes of the Vivado link, while platform and kernel modules are synthesized several at a time. Vivado's own log lines report 40–53% less, because they count one process. |
| How long does a build take? | The link is 91–97% of it: 1–6.1 hours for links that succeed. The same design took 62–188 minutes on different node types; a second build on the same node changed this by under 7%. A 10-second single-thread CPU benchmark run before the link ranks link times well; the node's load average does not. |
| Are builds repeatable? | Yes. Rebuilding a design on other nodes and CPU types gave identical HLS reports, routed timing and card outputs. |
| How much is lost to failed builds? | About half of all memory-hours charged went to builds that failed routing. Failed links ran up to 13.5 hours. |
| Can failures be caught early? | Placement failures, yes: the HLS report shows too many DSPs for one die. Routing failures, no: no rule on the HLS report held on new designs. A link time limit handles them instead; 6.5 h, predicted in advance, stopped no successful build. A more aggressive Vivado strategy did not rescue any routing failure and made them fail 1.8–3× later. |
Does the hardware match predict? |
Yes, bit for bit, for every U55C bitstream tested, on every test and stress input (up to 22,610 per design, including overflow and ±Inf/NaN), on several cards. Checking takes about 10 seconds of card time per design. |
| Do other toolchains change this? | Not for the designs we repeated: hls4ml main (Nov 2026), Vitis 2023.2 and Vitis 2025.2 gave the same outcomes, memory in the same band, and bit-exact bitstreams. |
| Can someone else reproduce it? | A rerun from an empty directory reproduced one design bit for bit: data, trained weights, HLS reports, simulation and card outputs. |
The work happened in rounds. Each round has a predictions file, written and committed before its jobs started, and a
scorecard with every verdict. Deviations from the plan are listed in the scorecard or a DEVIATIONS.md.
| Round | When | Builds | What it tested | Predictions | Results |
|---|---|---|---|---|---|
| Run week | Oct 17–19 | 31 | Cost of each hls4ml setting; repeats; an undersized job; with and without the SLR pin | predictions_v1.md + three amendments |
analysis/scorecard.md |
| Held-out | Oct 18 | 4 | Whether the job sizing derived from the run week holds for new designs | predictions_heldout.md |
analysis/scorecard.md |
| Card sessions | Oct 19–20 | — | Hardware vs predict for every built design, on two cards |
in predictions_v1.md (C1–C8) |
analysis/scorecard.md |
| Gate round | Oct 19 | 5 | A two-step build that checks the HLS report before the expensive link | predictions_gate.md |
analysis/scorecard_gate.md |
| Clean room | Oct 21 | 1 | Rebuilding one design from nothing | predictions_cleanroom.md |
analysis/scorecard_cleanroom.md |
| Larger model | Oct 22–23 | 2 | Whether the results hold for a model 10× larger | predictions_large.md |
analysis/scorecard_large.md |
| Node sharing | Oct 24 | 3 | Whether a second build on the same node slows the link | predictions_solo.md, predictions_pair.md |
analysis/scorecard_solo.md |
| Repeat round | Nov 22–24 | 7 | Rebuilds on pinned nodes (determinism, time on the slowest node, two at once); routing failures relinked with a congestion strategy | rigor_round/predictions_rigor.md |
rigor_round/scorecard_rigor.md |
| wa-hls4ml sample, batch 1 | Nov 24–26 | 13 | 12 designs drawn at random from the wa-hls4ml exemplar set; three-Job pipeline | wa_round/predictions_wa.md |
wa_round/scorecard_wa.md |
| Batch 2 | Nov 26–29 | 24 | 12 more random designs; hls4ml main; Vitis 2023.2 and 2025.2; Alveo U250 | b2_round/predictions_b2.md |
b2_round/scorecard_b2.md |
To see what we expected and what happened, read a predictions file and then its scorecard.
A build is three Kubernetes Jobs, chained by a small controller Job that runs in the cluster, so no laptop needs to stay connected:
| Stage | Job | Request | Does |
|---|---|---|---|
| 1 | job-s1-TEMPLATE.yaml |
1 CPU, 6 Gi (one retry at 16 Gi if out of memory; 12 h limit) | hls4ml convert, C-simulation, HLS synthesis, packaging; reads the HLS report and stops if the pinned die has too few DSPs |
| 2 | job-s2-TEMPLATE.yaml |
8 CPU, 40 Gi | the Vitis link (Vivado placement, routing, bitstream); logs memory, node load and a CPU benchmark |
| 3 | job-s3-TEMPLATE.yaml |
1 CPU, 4 Gi, 1 U55C | loads the bitstream and compares every output with C-simulation, bit for bit |
job-pipe-TEMPLATE.yamlis the controller. It restarts itself if its pod is lost and continues where it stopped.launch.sh DESIGNfills the templates fromdesigns/DESIGN.envand starts the controller;launch.sh DESIGN --adoptpicks up stage Jobs that already ran.designs/*.envholds one design each: model, reuse factor, precision, strategy, and optionally the board, the Vitis release and the hls4ml commit.launch_b2.shruns batch 2 group by group;collect.shcopies the results from the cluster's shared volume.sample_b2.py,wa_sample_b2.json,prep_wa.py: the random draw and the model/input generation.
wa_round/ is the same pipeline as first used (batch 1); rigor_round/ is the repeat round.
job-rw-prep.yamlsets everything up once: hls4ml at a fixed commit (8912ed2), the jet dataset (checksum checked), and the trained models.job-rw-prep-large.yamltrains the larger model.job-rw-build-TEMPLATE.yamlis one complete build in a single Job.make_builds.shfills it in for every design, producing thejob-rw-<design>.yamlfiles.job-rw-gate-s1-TEMPLATE.yamlandjob-rw-gate-s2-TEMPLATE.yamlare the first two-stage version (make_gate.shwrites the gate-round jobs).job-rw-card.yamlchecks bitstreams on a card; thejob-rw-card-*.yaml/.jsonfiles are the sessions that ran.job-rw2-*.yamlis the clean-room rerun;job-rw-large-*.yamlthe larger-model round;job-rw-solo-*.yaml,job-rw-pair*-*.yamlthe node-sharing test.
Supporting files: run_queue.sh, start_queue.sh, job-queue-TEMPLATE.yaml, queue-rbac.yaml (an in-cluster
queue), collect.sh, collect_cr.sh, pod-rw-peek.yaml, nrp_accounting*.py (what NRP charged per pod),
RUN_WEEK.md (the original run plan and what each file on the shared volume contains).
| File | Contents |
|---|---|
results_card_gate.zip |
Run week, held-out round, gate round and all card sessions |
results_gate.zip |
The gate round as first collected |
results_cleanroom.zip, results_large.zip, results_solo.zip |
Clean room, larger model, node sharing |
results_rg.zip |
Repeat round |
results_wa.zip, results_anomaly.zip |
wa-hls4ml batch 1, and the 16 Gi rerun of its one stage-1 failure |
results_b2.zip |
Batch 2 |
accounting*_2026*.json |
NRP's own records: requested CPU and memory × wall time for every pod |
SHA256SUMS |
Checksums of the zip files |
Inside the zips, each build has its own folder: stages.csv (stage start times), mem.csv / mem_link.csv (memory,
CPU and, from batch 2, node load every 15 s), the HLS reports, gate.json, the routed timing and utilisation reports,
result.json (card results), the image digest and the tool versions. Bitstreams are not included.
| File | What it does |
|---|---|
data/builds5.csv, data/gate.csv, data/card_*.csv |
One row per build or card session for the first rounds |
score_and_figs.py |
Scores the run-week, held-out and card predictions; writes scorecard.md and figures |
gate_analyze.py, cost_by_outcome.py, csynth_predictor.py, fig_link_profile.py |
Gate round, cost by outcome, the search for a routing-failure rule, memory over time |
scorecard*.md |
Every prediction with its verdict and the evidence |
A build name such as rw-jet-r4-p16-res reads as model jet, reuse factor 4, precision p16, strategy
res.
- Models chosen by us:
tiny16→8→5,jet16→64→32→32→5,big16→64→64→32→5,wide16→128→64→5,cnn(Conv1D),large16→256→256→128→5 (104k parameters). Random-sample designs start withwa-and use the wa-hls4ml model names (anomaly,automlp,cookie,jet,particle,quarks) with fixed-seed random weights. - Precision:
p1616-bit fixed point;w88-bit weights with 16-bit activations;p8/p28- / 2-bit. - Strategy:
latLatency (fully parallel),resResource (multipliers shared). - Prefixes:
ho-held-out,noslr-kernel not pinned to one die,rep-repeat,under-deliberately too little memory,g-gate round,rw2-clean room,rg-repeat round,hm-hls4ml main,v23-/v25-Vitis 2023.2 / 2025.2,u250-Alveo U250.
- hls4ml at commit 8912ed2 (unless the design says otherwise), VitisUnified backend,
driver='xrt',io_stream, kernel pinned to die SLR2 on the U55C (SLR0 on the U250) unless the name saysnoslr, target clock 3.333 ns - Vitis/Vivado 2024.2 (2023.2 and 2025.2 for the
v23-/v25-builds); platformxilinx_u55c_gen3x16_xdma_3_202210_1(U250:xilinx_u250_gen3x16_xdma_4_1_202210_1) - Container image
gitlab-registry.nrp-nautilus.io/nrp/coder-images/vivado-vitis, pinned by digest from the repeat round on; Vivado works on node-local scratch; results go to a shared volume - Data: the hls4ml LHC jet dataset (OpenML
hls4ml_lhc_jets_hlf, checksum-verified) and the wa-hls4ml exemplar list - The U250 builds use hls4ml with DDR board support from a fork commit under upstream review
You need kubectl access to an NRP namespace with the xilinx-tools volume, a shared work volume, and a U55C for the
card stage. Every command uses the namespace of your current kubectl context:
kubectl config set-context --current --namespace=<your-namespace>
NS=$(kubectl config view --minify -o jsonpath='{..namespace}')
sed "s/__NAMESPACE__/$NS/" wa_round/pipe-rbac.yaml | kubectl apply -f - # once: lets the controller Job run the stage Jobs
cd b2_round
./launch.sh wa-quarks-r1-p16-lat # any designs/*.env; stage 1 minutes, link 1.5–6 h, card about 1 min
kubectl logs -f job/pipe-wa-quarks-r1-p16-lat
./collect.sh # copies logs, reports and results to results/The first rounds' Job files at the top level can be applied directly with kubectl apply -f.
- Two memory numbers.
mem_anonis the build process itself;mem_currentadds the file cache. The cluster charges the amount requested, not either of these. - Link times depend on the machine. The scheduler picks the node; compare designs on the same CPU type.
- Pre-registration timing in batch 2. Its predictions were committed after the four stage-1 smoke tests had run, so the three "does this toolchain run" predictions count as observed. Nothing else had started.
- Lost pods. Three pods in the first rounds and six controller pods in batch 2 were lost with their node; no build result was affected, and each case is marked in the scorecards.
- Two HLS runs never finished: the larger model at RF=64 (stopped after 11.4 h) and one random-sample design at RF=1,024 (out of memory at 16 Gi).
This work used the National Research Platform, supported in part by NSF awards CNS-1730158, ACI-1540112, ACI-1541349, OAC-1826967, OAC-2112167, CNS-2100237 and CNS-2120019.