Running PSMNet Stereo Depth on a Kria KV260
Author: Abdul Raouf Khalid (10xEngineers)
Date: October 26, 2026
Estimated reading time: 7 min
PSMNet is a stereo network that estimates depth from a left and a right image, but it depends on 3D convolutions that the deep-learning processor (DPU) of the small Kria KV260 board cannot run. AMD publishes results only for the much larger Versal VCK190. We aimed to run PSMNet on the KV260 fast enough for low-rate monitoring tasks, where a few seconds per frame is acceptable. We split the network across the DPU, a custom programmable-logic kernel for the 3D convolutions, and optimized CPU code. The run time fell from about 167 s to about 11.3 s per stereo pair, or 6.60 s per frame (0.150 FPS) once the model is loaded, and accuracy matches AMD’s Versal result on our test frame. The VCK190 is faster, but it uses only a small fraction of its hardware capacity (under 1 %), whereas our design uses about a quarter of its much smaller capacity. The VCK190 suits higher frame rates, while the KV260 suits applications where a small, low-cost device matters more than speed. These results show that a small, low-cost FPGA board can run a 3D-convolution network, bringing stereo depth estimation to resource-limited edge devices.
1. Introduction
PSMNet is a stereo network: given a left and a right image, it estimates the disparity of every pixel, and from that, the depth. The pruned PSMNet from the Vitis AI model zoo needs 696 G operations per frame at 576 × 960, and most of that work is in 3D convolutions.
AMD has published PSMNet results only for the Versal VCK190, whose DPU natively supports 3D convolution. We enabled PSMNet on the much smaller AMD Kria KV260 Vision AI Starter Kit, whose DPU cannot run 3D convolution at all. Our first working version, which ran the 3D convolutions with plain scalar C++ code on the CPU (Chapter 3), was slow. The optimizations in Chapter 4 make PSMNet about 15 times faster, and on our test frame its accuracy matches that of the Versal implementation.
2. Problem Statement
The problem is to run PSMNet, a stereo depth network, on the AMD Kria KV260. PSMNet relies on 3D convolution, an operator the KV260’s DPU does not support. The KV260 uses the DPUCZDX8G, the DPU for Zynq UltraScale+ devices. It handles 2D convolution, pooling, and element-wise operations, but AMD’s operator table lists 3D convolution as unsupported on it (UG1414 v3.0, Currently Supported Operators). PSMNet has 28 3D-convolution layers. Together, these layers do most of the network’s computation, so the unsupported operator is the one the network depends on most.
The PSMNet application that AMD ships with Vitis AI targets only the VCK190, so there is no ready-made solution for the KV260, which is a much smaller, cheaper board and draws less power. Compiling the model for the KV260 still works: when the Vitis AI compiler meets a layer the DPU cannot run, it places that layer in a CPU subgraph. For PSMNet, this moves all 28 3D-convolution layers, the heaviest part of the network, onto the board’s four Arm Cortex-A53 cores. Running them there makes inference very slow (Chapter 3).
3. Baseline
The Vitis AI runtime cannot execute a CPU subgraph unless a library implements its operator. So before any optimization, we had to write one: a plain scalar C++ custom operator for 3D convolution and transposed 3D convolution. The runtime loads it by name, so the application did not need to change.
With this operator and models compiled for a large B4096 DPU, PSMNet ran on the KV260 for the first time. It took about 167 s per stereo pair, and most of that time was spent in the 3D convolutions on the CPU. This scalar code later became the bit-exact reference for every faster version.
4. Approach
To reduce the inference time, we split the network across three engines: the DPU, a custom kernel in the programmable logic (PL), and the CPU. The DPU runs the 2D feature extraction, the residual additions, and the final upsampling. The PL kernel, which we implement, runs all 28 3D-convolution layers. The CPU, using Arm NEON vector instructions, runs the glue stages between the models (Figure 4.1).
Figure 4.1. How PSMNet is split across the KV260. Gray boxes run in the programmable logic (the DPU or our 3D-convolution kernel); white boxes run on the Arm Cortex-A53 cores.
Vector code for the CPU convolution. We rewrite the 3D-convolution operator with NEON, the Arm vector instruction set, and spread it over the four CPU cores. This makes it much faster than the scalar code and gives a fallback for layers the PL kernel cannot handle.
Making room for a kernel. We recompile the model for a smaller B512 DPU, which frees the DSP slices our 3D-convolution kernel needs. We also remove the slow transpose at the end of the network, since it only changes the memory order.
A custom 3D-convolution kernel in the PL. We design a custom kernel in high-level synthesis (HLS) that runs all 3D convolutions next to the DPU, with a five-stage pipeline (Figure 4.2). Its multiply-accumulate (MAC) engine performs 768 int8 MACs per cycle at 200 MHz, about 0.31 TOPS peak, approximately three times the B512 DPU. The kernel is called from the same custom operator, so the application and model stay unchanged.
Figure 4.2. The custom 3D-convolution kernel. The five stages are connected by FIFOs and work on consecutive output lines at the same time.
A softmax without exponentials. Because the network works in 8-bit, only 256 different values can occur in the softmax. We compute them once and store them in a lookup table, which is much faster than the DPU version and gives the same result.
5. Results
This section reports the speed, the FPGA resources used, and a comparison with AMD’s Versal VCK190. After optimization, the KV260 processes a stereo pair in about 11.3 s, about 15 times faster than the baseline. About 4 s of this is one-time start-up (loading the model and preparing the kernels). Once the model is loaded, it runs at 6.60 s per frame (0.150 FPS). The 3D convolutions now take about 60 % of this time (Figure 5.1).
Table 5.2. Post-route resource use of the design. Zynq UltraScale+ XCK26 on the KV260, timing met at 200 and 400 MHz (worst negative slack +0.027 ns).
| Resource | DPUCZDX8G B512 | 3D-convolution kernel | Total used | Utilization |
|---|---|---|---|---|
| CLB LUTs | 26,328 | 42,586 | 75,617 | 64.6 % |
| DSP slices | 118 | 448 | 566 | 45.4 % |
| Block RAM (36 Kb) | 24 | 22 | 81.5 | 56.6 % |
| UltraRAM | 12 | 6 | 18 | 28.1 % |
CLB slice utilization is 93 %, so a larger kernel would be hard to place on this device.
5.1 Comparison with the Versal VCK190
AMD lists PSMNet at 0.4 FPS single-thread and 0.7 FPS multi-thread on the VCK190 (UG1354 v3.0, VCK190 performance). The VCK190 is faster, but its hardware is far larger (PG389, Resource Utilization), as Figure 5.2 shows.
Figure 5.2. The KV260 design as a percentage of the VCK190 (full bar = VCK190), with the actual values inside each bar. The KV260 multi-thread value is the single-thread measurement.
Table 5.3. Throughput per unit of hardware. This work: 0.150 FPS, batch 1, measured by us. VCK190: 0.4 FPS single-thread, batch 6, published by AMD. Resources cover the accelerators only, without platform logic.
| Measure | This work | VCK190 | Advantage |
|---|---|---|---|
| FPS per peak TOPS | 0.366 | 0.0065 | this work, ≈ 56× |
| FPS per 100k LUTs | 0.218 | 0.099 | this work, ≈ 2.2× |
| FPS per 100 DSP slices | 0.027 | 0.049 | VCK190, ≈ 1.9× |
Against the VCK190’s multi-thread figure, our advantage drops to about 32 times per TOPS and 1.25 times per LUT. These ratios are approximate, for three reasons:
- AMD’s VCK190 figures use batch 6 (UG1354 titles its table “VCK190 Performance with Batch 6”); ours use batch 1.
- The VCK190 resource figures come from AMD’s table of DPU configurations (PG389), not from a routed design like ours.
- The DSP comparison favors the VCK190 because its DPU is built mainly on 192 AI Engines; AMD calls it an “AIE-centric DPU”, and a DSP count does not include them.
We could not run a multi-thread comparison. A second application instance cannot allocate its 106 MB device buffers from the Linux contiguous memory allocator (CMA) pool. With one DPU, one 3D-convolution kernel and the softmax already on all four cores, it would gain little anyway.
6. Accuracy
We checked accuracy on a synthetic Scene Flow stereo frame (960 × 540, clean pass) with exact ground-truth disparity for every pixel. Three results were compared against it: our B512 + PL kernel design, the B4096 starting point, and the result of AMD’s Versal VCK190 implementation on the same image pair (Figure 6.1). The metrics are the end-point error (EPE), the root-mean-square error (RMSE), the share of pixels off by more than 3 px, and D1; the glossary defines each.
Figure 6.1. Left and right input, ground-truth disparity and the three results, all on the same color scale (one Scene Flow frame, 960 × 540).
Table 6.1. Accuracy against ground truth. One Scene Flow frame, 960 × 540; all metrics over pixels with valid ground truth.
| Result | EPE (px) | RMSE (px) | > 3 px % | D1 % |
|---|---|---|---|---|
| Versal (VCK190) | 1.319 | 3.929 | 3.74 | 3.53 |
| B4096 | 1.297 | 3.931 | 3.50 | 3.29 |
| B512 + PL kernel (this work) | 1.313 | 3.954 | 3.38 | 3.18 |
Figure 6.2. Share of pixels whose error against the ground truth is at most a given threshold. The three curves lie on top of each other.
All three results are equally accurate on this frame: their EPE differs by at most 0.022 px. Our result differs from the other two by about 0.66 px, mostly at object edges, less than any of them differs from the ground truth. That difference comes from the different DPU instructions generated for B512, not from the PL kernel, which is bit-exact with the CPU operator. The model zoo reports 1.049 px EPE for the INT8 model on Scene Flow, and our values are close to that, as expected for one frame.
They come from one image pair, so they show that our design matches the reference implementations on that frame, not what its accuracy is on a dataset. Each result was also saved as an 8-bit image (disparity × 1.7), so stored values move in steps of about 0.59 px, and JPEG compression adds more. All three results were saved the same way, so the comparison between them is fair, but their absolute errors are somewhat lower than the table shows.
7. Takeaway
When an accelerator lacks a layer type, the compiler’s CPU fallback is only a starting point. Lessons that carry over to other hardware:
- Profile the whole application, not just the model. The biggest single regression was a memory reorder that did no arithmetic.
- Use the runtime’s custom-operator interface as the seam between CPU and hardware. It let a PL kernel replace CPU code without changing the application, and it kept a bit-exact fallback.
- Size the DPU to leave room for what it cannot do. A smaller DPU plus a dedicated kernel beat a large DPU plus CPU fallback.
- Look for arithmetic you can remove. Integer inputs turned 106 million exponentials into a 256-entry table.
8. Method Note
This section lists the platform, the model, and how the run times, throughput, and accuracy figures in this case study were obtained.
- Platform: AMD Kria KV260 (Zynq UltraScale+ XCK26), Vitis AI 3.0, Vitis HLS and Vivado 2022.2, PetaLinux 2022.2.
- Model: pruned, quantized PSMNet from the Vitis AI 3.0 model zoo (pt_psmnet_sceneflow_576_960_0.68_696G_3.0), input 576 × 960. Training, pruning, and quantization were not part of this work.
- Timing: run times are per stereo pair, including model loading, from the runtime profile and application logs. Steady-state throughput comes from the Vitis AI PSMNet benchmark program run for 60 s with one thread, batch 1.
- VCK190 figures: published by AMD, not measured by us.
- Accuracy: one Scene Flow frame with exact ground truth; EPE, RMSE, pixels above 3 px, D1. Limitations: single frame, 8-bit saved results, no multi-thread run (CMA limit).
Glossary
The table below defines the abbreviations and technical terms used in this case study.
| Term | Meaning |
|---|---|
| B512, B4096 | Sizes of the DPUCZDX8G, named after their peak operations per clock cycle. |
| CMA | Contiguous memory allocator: the Linux pool of physically contiguous memory that accelerator buffers must come from. |
| Cost volume | A 4D tensor that pairs each left-image feature with the right-image feature at every candidate disparity. |
| D1 | Percentage of pixels whose error is above 3 px and above 5 % of the reference disparity (KITTI definition). |
| Disparity | Horizontal shift of a point between the left and right images, in pixels; depth is inversely proportional to it. |
| DPU | Deep-learning processor unit: AMD’s configurable neural-network accelerator in programmable logic. DPUCZDX8G is the Zynq UltraScale+ version (KV260); DPUCVDX8G is the Versal version (VCK190). |
| DSP slice | Hard multiply-accumulate block in the FPGA fabric. |
| EPE | End-point error: mean absolute difference between estimated and reference disparity, in pixels. |
| FPS | Frames per second. |
| HLS | High-level synthesis: generating hardware from C++, here with AMD Vitis HLS. |
| LUT | Look-up table, the basic logic element of the FPGA fabric. |
| MAC | Multiply-accumulate operation. |
| NEON | The Arm SIMD instruction set; one instruction works on 16 int8 values at a time. |
| PL | Programmable logic: the FPGA fabric of the device, as opposed to the processing system with its Arm cores. |
| RMSE | Root-mean-square disparity error, in pixels. |
| TOPS | Tera (10¹²) operations per second; one MAC counts as two operations. |
| UltraRAM | Large on-chip memory blocks of the Zynq UltraScale+ fabric. |
| XRT | Xilinx Runtime: the software library used to load and call kernels in the programmable logic from Linux. |
References
[1] J.-R. Chang, Y.-S. Chen, “Pyramid Stereo Matching Network”, CVPR 2018, arXiv:1803.08669.
[2] AMD, UG1354 Vitis AI Library User Guide, v3.0: VCK190 Evaluation Board performance.
[3] AMD, PG389 DPUCVDX8G for Versal ACAPs Product Guide, v1.3: Resource Utilization.
[4] AMD, UG1414 Vitis AI User Guide, v3.0: Currently Supported Operators.
[5] AMD, PG338 DPUCZDX8G for Zynq UltraScale+ MPSoCs Product Guide, v4.1.
[6] AMD, Vitis AI 3.0 DPU IP overview.
[7] AMD, Vitis AI 3.0 Model Zoo: pt_psmnet_sceneflow_576_960_0.68_696G_3.0.