Edge AI Compute: A Practical Guide to RVA23 and Homogeneous Heterogeneous Design
This article examines a second-generation edge computing subsystem pattern that combines a high-performance general-purpose CPU cluster with an AI-first compute cluster under a single operating system, delivering roughly 60 TOPS of AI compute. It explains the core ideas of homogeneous fusion, the engineering value of the RVA23 baseline, the trade-offs between the two cluster types, software-hardware co-design for LLM inference, and three layers of OS scheduling and resource governance, then closes with a practical adoption path and common pitfalls.
1. Why Edge Devices Need Fused “General-Purpose + AI” Compute
As large model capabilities move toward the device edge, edge hardware faces a structural contradiction. On one side, it must run a full general-purpose operating system, network protocol stacks, and graphics and multimedia pipelines. On the other, it must handle high-throughput workloads such as matrix multiplication and attention computation.
The conventional approach is to combine a CPU and a separate AI accelerator over a bus, each running its own firmware or driver. The result is duplicated memory bandwidth consumption, data shuttling back and forth between two chips, and a software stack split into two toolchains—making latency and power consumption hard to converge.
The starting point of a fused design is to provide both general-purpose and AI-first compute capabilities under the same instruction set architecture, so the two workload classes share an address space, a scheduler, and one compile and runtime toolchain. This article discusses a general engineering pattern for this class of second-generation edge computing subsystem: a high-performance general-purpose CPU cluster plus an AI-first compute cluster, running a single operating system, with overall AI compute in the range of 60 TOPS.
2. Core Ideas of the Homogeneous Fusion Pattern
“Homogeneous fusion” does not mean simply placing two core types side by side. It emphasizes consistency in three areas:
- Instruction set consistency: Both clusters implement the same RISC-V ISA, so the operating system needs only one kernel image, and threads can migrate between clusters without instruction translation or emulation.
- Memory model consistency: Unified virtual memory and a coherence protocol avoid the bandwidth waste and latency jitter caused by explicit copies.
- Software stack consistency: The compiler, runtime, debugger, and performance analysis tools are shared, so developers do not maintain two codebases for the “general-purpose side” and the “AI side.”
The direct benefit is reduced deployment complexity. Edge scenarios often require one device to handle visual preprocessing, decision planning, voice interaction, and model inference simultaneously. If the software stack is split, version alignment and on-site troubleshooting costs can quickly spiral out of control.
3. Engineering Value Enabled by RVA23
RVA23 is a “standard baseline” defined by the RISC-V community for general application processors. It consolidates previously scattered optional extensions into a set of mandatory and optional capabilities, covering vector, bit manipulation, virtualization, pointer masking, error checking, and more. For edge AI chips, its value appears in four main areas:
- Binary portability. Products compiled against RVA23 can run on different implementations without recompiling for each chip.
- Vector capability becomes a default. Quantized operators, normalization, and activation functions in LLM inference rely heavily on vectorization; with a baseline in place, compilers can enable auto-vectorization by default.
- System-level reliability. Pointer masking facilitates address space compression and shadow stack implementations, while error checking mechanisms improve stability for devices that run for long periods.
- Virtualization support for multi-tenancy. Partitioning a single physical device into mutually isolated execution domains is a prerequisite for reusing edge boxes across multiple workloads.
The following is an illustrative compile and capability-probing logic; actual parameters should follow the target toolchain:
/* General approach: confirm baseline capabilities and vector width, then choose an operator implementation */#include <stdint.h>int main(void) {unsigned long hwprobe = 0;/* Read enabled extensions via an architecture probe instruction or system interface */__asm__ volatile("mv %0, x0" : "=r"(hwprobe));(void)hwprobe;/* Dispatch at runtime by data size: scalar for small, quantized kernel for large */return 0;}
4. Engineering Trade-offs Between the Two Cluster Types
The general-purpose CPU cluster targets single-thread performance and operating system friendliness: a deeper out-of-order pipeline, larger private caches, and mature branch prediction. It handles protocol stacks, file systems, scheduling, and business logic.
The AI-first cluster targets multiply-accumulate throughput per watt: wider vector units, a simpler pipeline, smaller private caches but higher memory bandwidth utilization, and, when necessary, tightly coupled on-chip storage to hold model weights and activations. It also runs a general-purpose operating system, so ordinary threads can use it directly rather than going through a closed firmware interface.
The key to this trade-off is the “ratio.” A typical edge workload is not pure inference but a mixture of roughly “70% general-purpose, 30% AI.” Cluster sizing, shared cache capacity, and memory controller ratios therefore need to be tuned against real workload curves rather than stacked up for peak compute.
5. Software-Hardware Co-Design for Large Model Inference
Running LLMs in a 60 TOPS-class resource box requires strict precision and memory budgets. Practical co-design measures include:
- Low-bit quantization and mixed precision: Store weights in 4-bit or 8-bit, keep higher precision for critical layers, and control accuracy loss with a calibration set.
- Operator fusion: Fuse normalization, linear, and activation into a single kernel to reduce round trips of intermediate tensors.
- KV cache governance: Allocate in chunks by sequence length and combine with prefix reuse to reduce redundant computation.
- Scheduling and batching: Merge token-level computation across multiple requests to raise vector unit occupancy.
The pseudocode below expresses the dispatch idea:
def dispatch(layer, x, budget):if budget.prefill:return fused_gemm_norm(layer, x) # Compute-intensive, optimize for throughputelse:return quantized_mv(layer, x) # Memory-intensive, optimize for bandwidth efficiency
6. Operating System Scheduling and Resource Governance
A single operating system serving workloads with different real-time requirements needs three layers of governance:
The first layer is compute quota. Allocate cluster resources along two dimensions—time slices and vector unit occupancy—to prevent inference tasks from monopolizing resources for long periods and causing interaction stalls.
The second layer is memory and bandwidth governance. Cache partitioning, bandwidth reservation, and priority queues guarantee a memory access floor for foreground tasks.
The third layer is observability. Collect per-core utilization, cache misses, memory bandwidth, and temperature and power in a unified way to form a closed loop for tuning. If device-side data needs centralized analysis, it can connect to general-purpose capabilities, such as object storage for archiving, message queues for upstream buffering, and monitoring and alerting for threshold linkage.
7. Adoption Recommendations and Common Pitfalls
- Pitfall one: Looking only at peak compute. Edge experience is determined by tail latency and power consumption, so evaluate by P99 latency and performance per watt.
- Pitfall two: Treating AI as an add-on. If inference does not share memory and scheduling with business logic, the advantages of a fused architecture will not materialize.
- Pitfall three: Ignoring baseline consistency. Without unifying on the same ISA baseline, toolchain and image management costs will keep growing.
The recommended path is to first lock down the ISA baseline and compile targets, then calibrate cluster ratios with real mixed workloads, then build a three-stage optimization pipeline of quantization, fusion, and cache governance, and finally connect a unified observability system for long-term tuning. For teams that need cloud-side model training and batch evaluation, general-purpose capabilities from Baidu AI Cloud—such as container platforms, object storage, and monitoring and alerting—can support a division of labor of “cloud-side training, edge-side inference,” balancing cost, latency, and iteration efficiency.
