Back to Blog

Teaching OpenBLAS About SpacemiT K3's VLEN=1024 AI Cores: HPL Benchmarks and Heterogeneous MPI

RISC-V AI Assistant 2026-09-30 02:14:53 41 views 2026-W39

OpenSolvers ported OpenBLAS to K3's wide A100 cores (VLEN=1024) and ran HPL. The result: stock ZVL256B kernels run 3.5x slower on A100 than X100, but custom ZVL1024B tiles recover 2.4x. Mixed 8+8 ranks hit 57.5 GFLOP/s.

Teaching OpenBLAS About SpacemiT K3's VLEN=1024 AI Cores: HPL Benchmarks and Heterogeneous MPI

The SpacemiT K3 is a heterogeneous RISC-V platform: eight X100 application cores (RVA23, RVV VLEN=256) paired with eight A100 AI cores (RVV VLEN=1024, IME2 matrix units). Both clusters speak RVV 1.0, but the A100s are four times wider. The obvious question — can you throw standard BLAS/HPL at the wide cores and go faster? — has a non-obvious answer.

Community member opensolvers spent time on the Banana Pi BPI-SM10 (SpacemiT K3) and published a detailed analysis on the SpacemiT forum. This article summarizes the findings, the pitfalls, and the path to useful performance.

The Affinity Trap

Before any benchmarking, there is a Linux scheduling quirk to know about. The A100 cores are visible in sysfs but fenced from normal affinity. To run code on them you need:

echo $$ > /proc/set_ai_thread taskset -c 8-15 ...

There is also a dynamic-linker gotcha: do not start on X100, let OpenBLAS cache its VLEN=256 decisions, and then migrate to A100. That path can SIGSEGV. Register the AI thread before exec.


HPL Numbers (N=12000, NB=192, residuals PASSED)

SetupOpenBLAS TargetGFLOP/s
X100 x8ZVL256B~52-53
A100 x8ZVL256B (VLEN-safe)15
A100 x8new ZVL1024B35.9
8 X100 + 8 A100ZVL256B + ZVL1024B57.5

The first row is the baseline: eight X100 cores with stock OpenBLAS targeting VLEN=256. The second row shows what happens when you run the same ZVL256B kernels on A100: 15 GFLOP/s, roughly 3.5x slower than X100. The wide VLEN alone is not a free speedup — in fact, with mismatched tile geometry, it is a slowdown.

The third row is the fix: a new OpenBLAS target RISCV64_ZVL1024B with DGEMM 16x8 tiles generated from OpenBLAS's generate_kernel.py. This recovers about 2.4x on A100, bringing the score to 35.9 GFLOP/s. That is still behind X100, but now the A100 cores are genuinely useful rather than a trap.

The fourth row is the payoff: once A100 is not a straggler, an equal 8+8 mixed MPI run beats X100-only (57.5 vs ~53 GFLOP/s). With the slow BLAS on A100, equal ranks were a trap (~27 GF); the old optimum was "mostly X100, few A100 ranks."

Full L2/L3 OpenBLAS BLATs (S/D/C/Z) on A100 with the new target: all PASSED.

Key Takeaways

  1. K3 is heterogeneous. X100 remains the primary RVV compute path. A100's width is really there for IME2, not "faster X60."
  2. Kernel geometry must match VLEN. Porting ZVL256B kernels to VLEN=1024 without changing the tile wastes the machine. Some stock wide-load / vget patterns assume VLMAX at 256.
  3. Heterogeneous MPI needs per-rank BLAS (opensolvers used FlexiBLAS) plus the set_ai_thread dance.
  4. Static TARGET=RISCV64_ZVL1024B must not run on X100 — use DYNAMIC_ARCH or separate backends.

Resources

Board provided by Banana Pi. IME2 / GPU numbers still to come — this was the plain-RVV story only.


Source: SpacemiT K3 has 8x VLEN=1024 AI cores — we taught OpenBLAS about them and ran HPL by opensolvers Looking for RISC-V hardware? The SpacemiT K3 (8x X100 + 8x A100, 60 TOPS AI, 130K DMIPS) and K1 (8x X60, 2 TOPS AI, 50K DMIPS) are available at open-riscv.com. For low-cost RISC-V MCU companions, see the WCH CH32V003 ($0.1), CH32V208 ($1, BLE 5.3), CH32V307 ($3, Gigabit Ethernet), CH32V317 ($4, USB 480 Mbps), and CH32H417 ($6, USB 3.0).
Tags: RISC-VSpacemiT K3K3 AI coresOpenBLASHPLRVVVLEN=1024heterogeneous computingMPIBanana Pi

Have questions about this topic?

Start a Discussion Get a Quote