2026-11-26 15:40 UTC

A733 Linux bring-up reports working shader and zero-copy paths; NPU convolution still fails

state: seedheat: mediumuncertainty: mediumrelevance: mediumedge-inference linux-npuTim MichalsAllwinnerRadxa

What is this?

Tim Michals, a developer working with Radxa Cubie A7A hardware, describes an open-source effort to run parts of the Allwinner A733’s Vivante VIP9000 NPU and video stack through mainline Linux and Mesa’s etnaviv/Teflon software, rather than relying solely on the vendor kernel and proprietary tools. In his GitHub article, he reports that PPU shader compute and importing video buffers for zero-copy NPU-side processing work on hardware. The neural-network engine’s convolution path is not yet reliably working: he identifies an unresolved DRAM-read issue and reports incorrect convolution outputs. These are developer-reported results, not independently corroborated benchmarks or evidence of upstream integration; the article’s references to Linux 7.1 and Mesa versions describe his build, not necessarily generally available releases.

Why it matters

If the reported work matures, it could make an embedded AI accelerator more usable with an open Linux stack, reducing dependence on vendor-specific kernels and closed model tooling. The working shader and shared-buffer paths are useful groundwork for local camera processing, but the key advertised NPU capability—correct neural-network convolution—is still unresolved, so practical AI inference and performance claims remain unproven.

Current assessment

New evidence: in an article linked from a Hacker News post dated Nov. 23, 2026, Tim Michals reports A733 bring-up on a Radxa Cubie A7A using etnaviv and Mesa Teflon. He says PPU shader dispatches ran on hardware and V4L2 dma-buf buffers could be imported for shader processing without a CPU pixel copy. He also reports working camera/video components and gives latency figures, but these measurements come from his own account and are not independently validated here. Material limitation: neural-network convolution dispatches, while reaching the hardware, still produce incorrect results because an NN-engine DRAM-read issue remains open; the report also describes TFLite model support and further optimization as bring-up work, not a demonstrated reliable inference stack. The article characterizes this as mainline Linux 7.1 work, but the supplied sources do not establish that the patches have been merged upstream or are available in a standard distribution. Search results provide context for ongoing A733 mainline camera work, not independent confirmation of this NPU result. Track for reproducible convolution results, published patches and upstream status, and corroboration on other boards. If resolved and maintained, an open driver/runtime path could broaden access to on-device, privacy-preserving vision workloads and reduce vendor lock-in; current evidence supports promising plumbing rather than usable NPU inference.

Measured heat

now 0 pts/hpeak 2 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 86h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-23 02:21 (minted)⭐ origin echo-reconstructedA developer-authored account of Allwinner A733 NPU bring-up on mainline Linux, reporting working PPU shader compute and zero-copy video-to-N
Tim Michals on github (echo) · attributed from hn.story.50606477 · published time unknown
—
11-23 01:48first on hacker news · published · lag ?Freeing the Allwinner A733 3.0 Tops NPU Mainline Linux (Etnaviv and Mesa Teflon)
tcmichals
—
11-23 01:48amplified on hacker news 👑hn.story.50606477
tcmichals
peak 2 · 0 comments · 103% of case engagement
11-23 02:20our radar first saw it · lag ?discovery anchor: hn.story.50606477—
pace: p14 vs 2088 stories at the 72h mark (now 86h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnFreeing the Allwinner A733 3.0 Tops NPU Mainline Linux (Etnaviv and Mesa Teflon)
Retrieved article excerpt

Open article · Retrieved 2026-11-23T02:21:00.181498+00:00

# Freeing the 3.0 TOPS NPU on the Allwinner A733: How an On-Die Neural Accelerator Works, Mainline Linux `etnaviv` + Mesa Teflon Bring-Up, and Zero-Copy Video Processing

**By Tim Michals**  
*Featured for Hackster.io — Open-Source Edge AI, Mainline Linux & Embedded Vision*

---

## Introduction: What Does It Actually Take to Accelerate AI at the Edge?

Pick up almost any modern single-board computer and the headline spec jumps right off the box: *"Octa-Core CPU + 3.0 TOPS AI NPU!"* For robotics, smart cameras, and edge-vision projects, that promise sounds simple—plug in a camera, run a neural network, and detect objects in real time without needing a desktop GPU or sending video to the cloud.

Before diving into Linux drivers or silicon registers, it helps to step back and ask a simpler question: **what is an AI accelerator actually doing, and why does a normal CPU struggle with it?**

### 1. Why AI Needs So Much Math (and What "Convolution" Means)

When a computer vision model looks at a camera frame—say, a `1920×1080` image—it doesn't "see" a person or a stop sign all at once. Instead, it passes the image through dozens of layers of **convolution** (`CONV_2D`).

A **convolution** is surprisingly simple: imagine taking a tiny `3×3` magnifying glass (called a **kernel** or **filter**) and sliding it across every single pixel of the image. At each stop, the computer multiplies those 9 pixel values by 9 learned **weights** and adds them up into one output number. Early layers look for simple things like vertical edges or bright spots; deeper layers combine those patterns into wheels, faces, or text. A single modern vision model might perform **billions** of these tiny multiply-and-add steps on every single frame—30 times a second. A general-purpose CPU is built for complex logic and branching, not doing billions of repetitive multiplies per second, so it quickly gets hot, burns power, and drops frames.

### 2. Why "8-Bit Quantization" Is the Secret Behind TOPS

Models are usually trained on big server GPUs using 32-bit floating-point numbers (`FP32`—high-precision decimals). On a tiny embedded board, you don't need 32 bits of decimal precision just to tell a cat from a coffee mug. **Quantization** converts those `FP32` weights and pixel values into compact **8-bit whole numbers** (`INT8` or `UINT8`, from `-128..127` or `0..255`).

Shrinking from 32-bit decimals to 8-bit integers makes each multiply-add circuit roughly **15–20× smaller and more power-efficient**, and cuts memory traffic by **4×**. When a chip advertises **"3.0 TOPS"** (Tera Operations Per Second), it means 3 trillion 8-bit integer operations per second—not 32-bit desktop floating point.

### 3. Fixed-Function NN Cores vs. Programmable Shaders (and Why You Need Both)

An **NPU (Neural Processing Unit)** isn't just one giant calculator. Real AI pipelines do more than convolutions: you also have to resize/normalize camera pixels before inference, or run custom math, activations, and image filters afterward. Inside modern NPUs like the Vivante VIP9000 on Allwinner's A733, the silicon is split into two complementary helpers:

- **NN (Neural Network) Cores**: Fixed-function hardware arrays packed with hundreds of 8-bit multipliers. They are unbeatable at convolutions, but they *cannot* run arbitrary `if/else` code or general math.
- **PPU / Shader Core**: A small programmable parallel processor (like a mini compute GPU) that runs short parallel programs (**shaders**) across hundreds of pixels or tensor elements at once—handling custom math, image pre/post-processing, and ops the fixed-function NN cores don't support.

### 4. Why "Zero-Copy" Memory Matters for Live Video

Even with a fast NPU, copying a 1080p camera frame from the camera driver into CPU memory, converting it, and copying it back to the NPU wastes huge amounts of memory bandwidth. On Linux, **`dma-buf`** lets the camera hardware, video encoder, and NPU share the **exact same physical memory buffer**—so frames move from camera to NPU with **zero CPU copies**.

### Breaking Out of the Vendor BSP Trap

Most SBCs lock this NPU hardware inside an old vendor kernel (`5.15`), closed-source userspace libraries (`libVIPlite.so`), and proprietary offline `.nb` model compilers. On the **Radxa Cubie A7A (Allwinner A733)** and **Cubie A5E (Allwinner T527)**, we set out to unlock this stack on **100% open-source mainline Linux 7.1** using the upstream **`etnaviv`** DRM driver (`/dev/dri/renderD128`), **Mesa 26.1.8 Teflon** (`libteflon.so`, which runs standard `.tflite` models directly), and **`V4L2` `dma-buf`** zero-copy camera pipelines.

Real silicon bring-up is messy, and this article shares the whole journey—what already works on live Cubie A7A hardware (PPU shader compute at `0.059–0.396 ms`, zero-copy `V4L2` `/dev/video0` and CMA `dma-buf` -> NPU PRIME at `0.401–0.487 ms`, and `ov5647` CSI + `Cedrus` H.265 video), as well as the open `HW_V83` NN `conv2d` DRAM-read investigation still underway.

### Why Edge AI Matters (and CPU vs. GPU vs. NPU at a Glance)

Running AI locally on the board ("at the edge") instead of in the cloud delivers **sub-millisecond latency** (critical for robotics and drones), **privacy** (camera feeds never leave the device), **offline reliability**, and **high performance per watt**:

- **CPU**: Great for operating systems, networking, and branching logic (`if/else`); poor at billions of repetitive matrix multiplies.
- **GPU**: Built for 32-bit floating-point graphics and parallel math, but power-hungry and absent or small on many headless embedded SoCs.
- **NPU**: Purpose-built for quantized 8-bit neural network math and on-chip SRAM dataflow at a fraction of the power.

### Companion Articles, Guides & How You Can Help

If you want to go deeper—or help crack the remaining open `HW_V83` NN bring-up items—these companion guides cover each layer of the stack:

- **Use Cases & Workload Mapping**: [Inside an Edge AI Chip: NN Cores, Shaders, and Why You Need Both](https://github.com/tcmichals/cubie-a5e/blob/main/docs/articles/part6_a733_npu_nn_vs_shaders_best_uses.md) — plain-English guide to matching workloads across NPU, PPU shaders, Arm NEON, ISP/VE, and the on-die XuanTie E902 RISC-V core.
- **Silicon Debugging War Stories**: [Freeing the Allwinner A733 NPU on Mainline Linux 7.1: The 8 Real-World Problems We Solved](https://github.com/tcmichals/cubie-a5e/blob/main/docs/articles/part7_a733_npu_silicon_debugging_problems_solved.md) — deep dive into `0x9003` vs. `0x9202`, `TP_ENGINE=0`, MMUv2 PDMODE, and the ongoing `HW_V83` NN DRAM-read investigation.
- **Copy-Pasteable Build, C++, PPU & Video Examples**: [Allwinner T527 & A733 Mainline NPU Guide](https://github.com/tcmichals/cubie-a5e/blob/main/docs/common/NPU_ACCELERATION_GUIDE.md) — complete build instructions and verified `npu-ppu-test` / `npu-v4l2-dmabuf-test` commands.
- **Camera & Hardware Video Encoding**: [Camera / ISP 602 V4L2 Guide](https://github.com/tcmichals/cubie-a5e/blob/main/docs/common/CAMERA_V4L2_GUIDE.md) and [A733 Cedrus H.264/H.265 Encoder Guide](https://github.com/tcmichals/cubie-a5e/blob/main/docs/common/A733_VE_ENCODER_GUIDE.md).
- **Upstream References**: [Mesa Teflon Documentation](https://docs.mesa3d.org/teflon.html) and Linux kernel `drivers/gpu/drm/etnaviv/`.
- **Want to pitch in?** Community kernel/Mesa hackers are especially welcome to help test or trace the two remaining open items: the `HW_V83` (`0x9202`) NN `conv2d` DRAM-read bug and `etnaviv.ko` `rmmod`/`insmod` `PD_NPU` re-probe (`GC0` after power-domain cycle).

---

## 🚀 1. Silicon Architecture: How the A733 & T527 NPUs Work Under the Hood

If you have ever deployed a computer vision model (like YOLOv8, MobileNetV2, or PoseNet) on an embedded Linux single-board computer, you have felt the wall that general-purpose CPU cores hit when processing real-time 1080p video.

Even on a modern octa-core processor like the **Allwinner A733** (2× Arm Cortex-A76 @ 2.0 GHz + 6× Cortex-A55 @ 1.8 GHz, powering the **Radxa Cubie A7A**) or the **Allwinner T527** (8× Cortex-A55 @ 1.8 GHz, powering the **Radxa Cubie A5E**), running millions of multiply-accumulate operations per frame on the CPU means:

- Burning **3–5 Watts** of CPU thermal budget on matrix math instead of application logic.
- Saturating the CPU's L1/L2 caches and external DRAM bus by repeatedly fetching weights and writing intermediate feature maps.
- Dropping frames whenever the CPU also has to handle camera capture, H.264/H.265 video encoding, or network streaming.

To solve this, silicon designers place a dedicated **Neural Processing Unit (NPU)** right on the SoC die. On the **Allwinner A733** (verified on live **Radxa Cubie A7A** silicon), that NPU is a **3.0 TOPS-class VeriSilicon Vivante VIP9000Nano-DI (`npu@3600000`, `model 0x9000`, `rev 0x9202`, `HW_V83`)**; on the **Allwinner T527**, it is a **2.0 TOPS VeriSilicon Vivante VIP9000Nano-SI+ (`npu@7120000`, `rev 0x9003`)**.

### How Does an NPU Work Compared to a CPU or GPU?

Unlike a CPU (which fetches scalar or small SIMD instructions one by one) or a GPU (which runs general-purpose 32-bit floating-point shaders), a neural network accelerator is a **spatial dataflow engine** purpose-built around four hardware principles:

1. **8-Bit Quantized Tensor Math (`INT8` / `UINT8`)**:
   Neural networks trained in 32-bit floating point (`FP32`) are quantized to 8-bit integers (`INT8` or `UINT8`) using per-tensor or per-channel scale and zero-point parameters. An 8-bit integer multiply-accumulate (**MAC**) circuit takes roughly **15–20× less silicon area and switching energy** than an `FP32` fused multiply-add, allowing the A733 NPU to pack **8 parallel NN cores × 64 MADs/core** (with ZDP3 spatial reuse, delivering up to **3.0 TOPS** marketed peak at high OPP clocks) into a compact silicon footprint.
2. **Spatial Weight & Activation Broadcast Across 8 NN Cores**:
   In a 2D convolution ($3 \times 3$ or $1 \times 1$), the exact same kernel weights slide across thousands of $(x, y)$ pixel locations, while the same input pixel patch is multiplied against dozens of output channels. Instead of reading weights from DRAM over and over, the NPU loads weights and input tiles once into **512 KB of ultra-wide on-chip VIP SRAM** (**128 bytes / 1024 bits per cycle** physical width on the A733) and broadcasts them simultaneously across its **8 Neural Network (NN) cores**.
3. **On-the-Fly Hardware Weight Decompression (Huffman + ZRL)**:
   Neural network weights contain large runs of zeros and clustered small integer values. When a model is loaded, its weights are compressed using **Huffman coding and Zero-Run-Length (ZRL)** encoding. Inside the NPU, a dedicated hardware bitstream decoder decompresses weights as DMA streams them from LPDDR5—cutting external memory bandwidth by **2–4×** with zero CPU overhead.
4. **Fused Hardware Pooling, Activation & Requantization**:
   Before a partial sum ever leaves an NN core, dedicated inline stages apply 32-bit bias addition, non-linear activation (`ReLU`, `ReLU6`, `Clamp`), $2 \times 2$ max or average pooling, and 8-bit requantization in a single pass. On SoCs with a dedicated **Tensor Processor (TP)** (such as the T527), layout transposes and LUT activations run on TP cores; on the A733 `0x9202` (`TP_ENGINE = 0`), non-NN ops fall to the companion **Programmable Shader / PPU** core (`NumShaderCores = 1`) or CPU.

### NN Cores vs. PPU Shaders vs. Missing TP Engine: Why Both Paths Matter (and Best Use Cases)

A common misconception is that an "NPU" is one single black-box circuit. On the Allwinner A733 (`VIP9000Nano-DI`, rev `0x9202`), the block at `0x03600000` is actually a **two-engine heterogeneous compute cluster** sharing one Front-End DMA parser and MMUv2:

- **8× NN Cores (Fixed-Function Convolution Arrays)**: Ultra-dense INT8 multiply-accumulate hardware (512 MACs/cycle). Blazing fast for `CONV_2D`, `DEPTHWISE_CONV_2D`, and `FULLY_CONNECTED` (90%+ of a YOLO or Mobil
tcmichals20
🟧 echo.github ⭐A developer-authored account of Allwinner A733 NPU bring-up on mainline Linux, reporting working PPU shader compute and zero-copy video-to-NTim Michals——

Interpretation history

Decision trace