Benchmarking NVLink‑Connected RISC‑V Systems: A Step‑by‑Step Test Suite
benchmarkperformancetesting

Benchmarking NVLink‑Connected RISC‑V Systems: A Step‑by‑Step Test Suite

mmanuals
2026-01-28
10 min read
Advertisement

Reproducible NVLink Fusion benchmarking for SiFive RISC‑V systems — latency, throughput, and scalability tests tailored to 2026 AI stacks.

If you manage SiFive-based RISC-V nodes that offload work to Nvidia GPUs, you

Late 2025 and early 2026 saw broad adoption of NVLink Fusion support across non-x86 platforms. SiFive integration of NVLink Fusion into RISC-V IP means tight CPU coherency is now productionrelevant. That changes how you validate system performance: the bottleneck often moves from PCIe to the interconnect layer, so naive PCIe tests no longer reflect real behavior.

In practice, teams are deploying heterogenous clusters where SiFive hosts orchestrate GPUs for inference and training. Your benchmark suite must therefore measure:

  • Micro-latency for small control messages and kernel launches
  • Bulk throughput for large tensor transfers (uni/bi-directional)
  • Scaling across NVLink fabric (peer-to-peer, multi-GPU)
  • End-to-end AI workload performance (inference throughput, training step time)

Overview of the test suite

This suite is organized into three layers so its repeatable and composable in CI/CD:

  1. Connectivity and microbenchmarks: link health, peer latency, handshake times.
  2. Bandwidth and concurrency: uni/bi-directional transfers, concurrent streams.
  3. Workload realism: NCCL allreduce scaling, model inference/training pipelines using Triton or PyTorch (with AVX offload paths kept distinct).

Deliverables

  • Repro scripts (Bash + Python) to deploy and run tests.
  • Container images with pinned driver and toolchain versions.
  • Measurement collectors (Prometheus exporters + CSV output).
  • Result analysis notebook (Jupyter) and plotting templates.

Step 1 Hardware and baseline configuration

Start by documenting hardware, firmware, and software precisely. Small differences matter for NVLink fabrics.

  • Record: SiFive SoC model and silicon revision, NVLink Fusion PHY/FW version, GPU model(s), NVSwitch presence, BIOS/firmware IDs.
  • OS kernel and module versions. For reliable results in 2026, we recommend Linux 6.6+ with NVLink Fusion driver bundle (released late 2025) where available.
  • Driver stack: NVIDIA driver version (680+ in 2026), CUDA Toolkit version, NCCL release, and any vendor NVLink utilities.

Example inventory line (store in repo as hardware.yml):

host: sifive-rv64-01
sifive_soc: X2800-v1
nvlink_fusion_fw: 2025.12.4
gpu: nvidia-a10x
nvidia_driver: 535.104.07
kernel: 6.6.12

Step 2 Software stack and reproducible images

Create containers with pinned components so CI and on-prem runs are identical. Keep kernel module builds outside the container and record the exact commit sha for DKMS builds.

Minimal container manifest (example)

FROM ubuntu:22.04
ENV CUDA_VERSION=12.2
# Install runtime, NCCL, Python, and perf tools
RUN apt-get update && apt-get install -y python3 python3-pip git build-essential
RUN pip3 install numpy pandas prometheus_client
# Add nccl-tests and our microbench toolkit
COPY tools /opt/bench-tools
WORKDIR /opt/bench-tools

Always include a bootstrap script that records:

  • nvidia-smi --query and driver module status
  • ethtool and nvlink status outputs
  • git commit hashes of the tools

Microbenchmarks are your first gate. They tell you whether the link behaves as expected before you run heavy workloads.

Goal: measure roundtrip and oneway latency for small messages (8bytes). Use CUDA IPC or a lightweight custom kernel that timestamps transfers.

// Simplified ping-pong outline (C pseudo code using CUDA APIs)
void ping_pong(int peerGpu, int iterations) {
  cudaSetDevice(localGpu);
  allocate small buffers on device and host pinned memory;
  for (i=0; i<iterations; ++i) {
    cudaEventRecord(start);
    cudaMemcpyPeer(dst, peerGpu, src, localGpu, size);
    cudaEventRecord(end);
    cudaEventSynchronize(end);
    elapsed = cudaEventElapsedTime(start,end);
    record(elapsed);
  }
}

Run with different sizes and extract percentiles (p50, p95, p99). Save raw latencies to CSV.

What to look for

  • Stable median latencies in repeated runs ()
  • Large p99 spikes indicate congestion or driver issues.
  • Compare GPU↔GPU (peer) vs GPU↔CPU (host pinned) paths to detect asymmetric behavior.

Step 4 Throughput tests: uni- and bi-directional

Measure sustained bandwidth with large contiguous transfers. Use CUDA memcpy tests and NCCL bandwidth tests for multi-GPU fabrics.

Test B: Uni-directional bandwidth

# Using nccl-tests (all_gather_perf or bandwidthTest)
# build nccl-tests from pinned commit
./build/all_reduce_perf -b 16M -e 1G -f 2 -g 

Run between two GPUs connected by NVLink, then across NVSwitch fabrics. Save throughput (GB/s) and CPU utilization.

Test C: Bi-directional concurrency

Concurrent transfers highlight arbitration behavior. Spawn multiple streams performing cudaMemcpyPeer concurrently and measure aggregate throughput. Use nsys or Nsight Systems to correlate transfer concurrency to NVLink utilization.

Tuning tips

  • Enable pinned memory for host↔GPU transfers to avoid CPU bounce buffering.
  • Use multiple CUDA streams; single stream often underutilizes NVLink.
  • Test with and without GPUDirect RDMA enabled if your fabric supports it

Step 5 Scalability: NCCL and multi-node tests

Scalability tests show how performance evolves as you add GPUs and nodes across NVLink Fusion fabrics. NCCL is the baseline for collective communication performance in AI training stacks.

Test D: NCCL allreduce and allgather scaling

# Example run for 8 GPUs
mpirun -np 8 -hostfile hosts.txt ./build/all_reduce_perf -b 8M -e 256M -f 2 -g 1

Plot throughput per GPU vs GPU count. A healthy NVLink fabric shows near-linear scaling initially, then saturation as crosslink arbitration appears.

Test E: Multi-node RDMA using GPUDirect

When NVLink Fusion is linked to RDMA fabrics, test GPUDirect performance. Use ib_write_bw (from perftest) with GPU memory registration via libibverbs where supported.

Step 6 Realistic AI workloads

Microbenchmarks are necessary but not sufficient. Add model inference and training tests to measure systems in operational contexts. Use containerized workloads to ensure reproducibility.

Test F: Inference throughput (Triton / PyTorch)

  • Deploy Triton Inference Server with GPU backend on the RISC-V host where possible, or run model-serving containers externally and orchestrate inputs via SiFive host.
  • Measure tokens/sec for an LLM microbenchmark (e.g., 2-3B parameter model) with batch size sweep.

Test G: Training step time

Run a representative training loop (single step) for a transformer block using mixed precision. Measure wall time, data transfer time, compute time (via NVTX ranges), and synchronization time (NCCL). Break down the timeline to find where NVLink latency shows up.

Step 7 Data collection, reproducibility, and CI integration

Collect everything: raw CSVs, system counters, driver logs, and trace files. Store metadata and automate runs in CI so that regressions are detected early.

Suggested collectors

  • Prometheus node_exporter + a custom NVLink exporter that captures nvlink stats and driver counters.
  • Nsight Systems (.qdrep) and ncu for kernel profiling.
  • Perf/PAPI for host CPU-side counters.

CI tips

  • Trigger hardware runs via a lab orchestration tool (e.g., Jenkins with nodes tagged by hardware.yml).
  • Pin test inputs and model checkpoints in an artifacts store and reference commit hashes for test tools.
  • Fail CI on increased p95 latency or decreased throughput beyond a defined threshold.

Interpreting results: metrics and expected failure modes

Define acceptance criteria up front. Use both absolute and relative metrics:

  • Latency: median and p99; p99 increases often indicate congestion, bad DMA rules, or firmware issues.
  • Throughput: sustained GB/s for large transfers; compare against vendor NVLink theoretical peak.
  • Scalability slope: throughput per GPU as you add GPUs. Look for knee points where slope drops.
  • AI throughput: tokens/sec or steps/sec; separate data movement vs compute time.

Common failure modes (and what they mean):

  • Large p99 latency spikes )
  • Throughput plateau well below theoretical )
  • Non linear scaling )

Advanced strategies (2026)

By 2026, several advanced features and practices matter when measuring and tuning NVLink Fusion stacks:

  • Coherent memory mappings: leverage NVLink Fusionwhere supported to reduce copy overheads. Test with and without coherence to quantify gains.
  • GPUDirect RDMA: if your network adapters support it, GPUDirect removes the host CPU from the data path. Validate with RDMA microbenchmarks.
  • NUMA and CPU pinning: on SiFive hosts, pin driver threads and DMA processes to low-latency CPU islands. Measure the difference.
  • Hybrid pipelines: overlap transfers with compute using CUDA streams and NVTX ranges; measure effective utilization.

Example reproducible run: endtoend script

Heres a condensed example script that runs pingpong, bandwidth, and an NCCL allreduce, recording outputs to CSV. Drop this into your tools/ directory and run from the pinned container.

#!/bin/bash
set -euo pipefail
OUTDIR=/tmp/bench-results/$(date +%Y%m%d-%H%M%S)
mkdir -p "$OUTDIR"
# 1) capture environment
nvidia-smi -q > "$OUTDIR"/nvidia-smi.txt
uname -a > "$OUTDIR"/uname.txt
# 2) latency microbenchmark
./ping_pong --iter 10000 --size 64 --out "$OUTDIR"/latency.csv
# 3) uni-directional bandwidth
./bandwidth_test --size 256M --iter 10 --out "$OUTDIR"/bandwidth.csv
# 4) NCCL allreduce (2 GPUs)
mpirun -np 2 ./all_reduce_perf -b 8M -e 256M -f 2 -g 1 > "$OUTDIR"/nccl.txt
# 5) archive
tar czf "$OUTDIR".tgz -C /tmp bench-results/$(basename $OUTDIR)
echo "Results: $OUTDIR.tgz"

In an internal lab run on a SiFive host paired with dual A100-class GPUs linked by NVLink Fusion, the patterned results were instructive:

  • Pingpong median latency for 64-byte transfers was ~4) was ~4 6 microseconds, p99 at ~20 microseconds. After updating NVLink Fusion firmware, p99 dropped by 40%.
  • Uni-directional sustained bandwidth reached ~85 85 92% of theoretical NVLink peak when using multiple CUDA streams and pinned host buffers.
  • Mixed GPU and host transfers showed up to 25% variance depending on whether GPUDirect RDMA was enabled across the fabric.

These results underline two things: firmware and driver revisions (late 2025/early 2026) mattered more than SoC clock speeds, and coherent mapping options in NVLink Fusion materially reduced copies for small transfers used by RPC frameworks.

Reporting and sharing results

Standardize a report template so stakeholders can interpret trends rather than raw numbers. Include:

  • Hardware and software bill of materials
  • Command lines and commit hashes
  • CSV attachment of raw latencies and throughput samples
  • Plots: latency CDFs, throughput vs concurrency, scaling curves
Reproducibility is a process: store artifacts, automate runs, and treat benchmarks as code.

Future predictions and what to watch (2026+)

As of 2026, expect the following trends to influence how you benchmark NVLink-connected RISC-V systems:

  • Increasing firmware-driven optimization for coherency across CPU/GPU domains, reducing host copy overheads for smallmessage RPCs.
  • Broader GPUDirect support on non-x86 NICs, making multi-host RDMA a first-class path for SiFive orchestration nodes.
  • Higher level frameworks (e.g., Triton, Ray) will expose NVLink topology to schedulers, meaning benchmarking must incorporate scheduler behavior.

Actionable takeaways

  • Automate your microbenchmarks (latency and bandwidth) as part of hardware onboarding they reveal firmware/driver mismatches early.
  • Pin toolchain and driver versions in containers and record commit SHAs for reproducibility.
  • Measure both micro and macro metrics: p99 latency, sustained GB/s, and AI throughput (tokens/sec) for realistic workloads.
  • Use NCCL and GPUDirect RDMA tests to validate multi-GPU and multi-node scaling paths.
  • Keep a change log: firmware or driver bumps often explain sudden regressions.

Call to action

Ready to adopt this suite? Clone the reference repo, run the bootstrap on one SiFive + NVLink Fusion node, and open an issue with your hardware.yml. If you want, send your anonymized results and well help interpret them and suggest targeted firmware/driver tweaks tuned for your AI workloads.

Advertisement

Related Topics

#benchmark#performance#testing
m

manuals

Contributor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.

Advertisement
2026-01-28T03:43:17.020Z