Edge AI Compute: RVA23 and Heterogeneous Convergence Through Hardware-Software Co-Design

    This article examines how edge AI and robotics workloads are pushing hardware design in two directions at once: general-purpose computing and memory-intensive generative inference. It explains the homogeneous convergence model, where general-purpose and AI-first cores share one ISA and one OS image, and why RVA23 matters as a dependable baseline for memory ordering, bit manipulation, vector support, and virtualization. It then covers practical hardware-software co-design for on-device LLM inference, including low-precision quantization, cache-blocked computation, KV cache management, operator fusion, and core affinity, followed by system software mechanisms for scheduling, resource governance, observability, and deployment recommendations.

    1. The Problem: Compute and Complexity Constraints at the Edge

    Edge AI and robotics workloads are pulling hardware design in two directions at the same time. General-purpose compute has not gone away: operating systems, network stacks, sensor fusion, and real-time control loops still depend on mature scalar execution and virtual memory. At the same time, generative models introduce a new set of compute demands. Large language model inference is strongly memory-bound during the decode phase, making it highly sensitive to memory bandwidth, on-chip cache capacity, and low-precision datapaths.

    The conventional approach assigns these two categories of demand to two separate chips, or to one CPU plus a discrete AI accelerator, each driven by its own software stack. The cost is higher board area and power, double the system images and operational objects, a more complex matrix of operator and driver versions, and latency jitter that is hard to converge. This is why the industry is exploring a more compact path: integrating general-purpose cores and AI-oriented cores under a single instruction set architecture, running one operating system, and using hardware-software co-design to deliver both general capability and AI throughput within a constrained power and area budget.

    2. The Homogeneous Convergence Model: One Architecture, Two Core Types, One System

    Homogeneous convergence does not mean making the two core types identical. It means having them share the same instruction set and privileged architecture specification, so they can also share compilers, runtimes, debug tooling, and the OS image. The system consists of two parts:

    • General-purpose compute cluster: optimized for single-thread performance, out-of-order execution, larger caches, and mature memory model support. It carries OS and control-plane tasks.
    • AI-first compute cluster: optimized for throughput and energy efficiency, with wider execution pipelines, low-precision datapaths, a larger shared last-level cache, and higher memory concurrency. It carries inference data-plane tasks.

    The engineering payoff concentrates in three areas. First, software stack consolidation: one kernel image, one firmware flow, and one toolchain cover all cores, avoiding cross-architecture translation and duplicate maintenance. Second, scheduling freedom: the OS can place control-plane threads on general-purpose cores and migrate inference operator threads to AI-first cores, even doing thread-level placement within a single process. Third, lower validation and compliance cost: a unified architecture means a unified exception model, a unified virtualization mechanism, and a unified baseline for security features.

    3. Why RVA23 Matters: Turning Fragmentation into a Dependable Baseline

    Fragmentation has long been a criticism of RISC-V, and in the application processor space it is being converged through versioned architecture specifications. The significance of RVA23 is that it packages capabilities previously scattered across several extensions into a single dependable baseline, so software developers can assume they are present instead of writing conditional branches for every microarchitecture. For edge devices, the value shows up in four areas:

    1. Memory model and multi-core consistency: a well-defined memory ordering model means multi-core inference frameworks and OS schedulers no longer need vendor-specific patches.
    2. Bit manipulation and string handling extensions: these substantially accelerate scalar-heavy tasks such as protocol parsing, log processing, and codec container muxing.
    3. Baseline vector and hyper-vector capabilities: a programmable SIMD path for operators such as convolution and attention, which makes compiler auto-vectorization practical.
    4. Normalized virtualization and exception model: a unified implementation foundation for multi-tenant isolation, real-time partitioning, and secure boot.

    Enabling a new baseline is not zero cost. It requires the toolchain, kernel, runtime, and binary distributions to upgrade together, and the validation phase must cover compatibility regression for legacy binaries. A common practice is to enable the full baseline on the new cores first, keep a backward-compatible subset on the general-purpose cores, and use one image with runtime dispatch based on per-core capability.

    4. Hardware-Software Co-Design for LLM Inference

    The central tension in on-device LLM inference is weight size versus memory bandwidth. Each generated token requires reading the weights in full during decode, so arithmetic intensity is extremely low and the performance ceiling is set almost entirely by bandwidth. Practical co-design techniques include:

    • Low-precision weights and activations: integer quantization to 8 bits or lower, with per-channel or per-group scaling factors, reduces memory traffic while keeping accuracy under control.
    • Blocking and in-place computation: tile matrix-vector multiplication by cache line so weight blocks are reused in on-chip cache, reducing round trips to external memory.
    • KV cache governance: paged allocation of the key-value cache, with prefix sharing and on-demand eviction, avoids fragmentation in long-context scenarios.
    • Operator fusion and schedule trimming: fuse normalization, activation, and residual add into adjacent operators to reduce materialization of intermediate tensors.
    • Thread and core placement: put compute-heavy work such as prefill on throughput cores, and sampling, routing, and I/O on general-purpose cores, to reduce tail latency.

    A sketch of stage-aware thread placement looks like this:

    1. /* Pseudocode: bind cores based on stage characteristics */
    2. void run_inference_stage(stage_t s) {
    3. cpu_set_t set;
    4. CPU_ZERO(&set);
    5. if (s == STAGE_PREFILL) {
    6. /* Compute-heavy: bind to the throughput-first core set */
    7. bind_cpus(&set, THROUGHPUT_CORE_MASK);
    8. } else {
    9. /* Memory and scheduling heavy: bind to the general-purpose core set */
    10. bind_cpus(&set, GENERAL_CORE_MASK);
    11. }
    12. sched_setaffinity(0, sizeof(set), &set);
    13. execute(s);
    14. }

    On memory-constrained platforms, this should be paired with a unified tensor memory pool and a zero-copy pipeline: model weights are loaded as read-only mappings, and input and output tensors are passed between the inference service and pre/post-processing modules through shared buffers, avoiding bandwidth waste from repeated copies.

    5. System Software Stack: Scheduling, Resource Governance, and Observability

    On top of a single OS, resource governance determines actual energy efficiency. Mechanisms that work in practice include:

    • Layered scheduling: partition CPU sets into control-plane and data-plane groups, where the control plane guarantees real-time behavior and the data plane pursues throughput.
    • Frequency and thermal management: adjust performance states dynamically based on the operator stage, prioritizing bandwidth and cache during decode and dropping power quickly during idle periods.
    • Memory tiering: assign weights, key-value cache, and transient activations to memory regions of different priority, with reclamation policies that avoid inference jitter.
    • Isolation and quotas: use control groups to cap CPU and memory quotas per inference instance so multiple instances do not interfere with each other.
    • Observability: build a closed loop from metrics collection, structured logging, and tracing, focusing on per-token latency, cache miss rate, and memory bandwidth utilization.

    If model compilation, image building, and batch evaluation run in the cloud, general cloud capabilities usually suffice: object storage holds models and artifacts, a container platform carries compilation and load-test jobs, a message queue decouples the evaluation pipeline, and monitoring and alerting services track latency and temperature metrics reported by edge devices. Baidu AI Cloud offers the same class of general-purpose infrastructure in these scenarios, and can be composed as needed.

    6. Implementation Recommendations

    1. Define SLOs before choosing a form factor: fix per-token latency, concurrency, and the power ceiling first, then decide core ratios and memory specifications.
    2. Build a capability detection and dispatch layer: query the architecture baseline at runtime instead of hardcoding new extensions into business logic.
    3. Bring quantization and operator libraries into continuous integration: run accuracy regression and bandwidth benchmarks on every model update to prevent silent degradation.
    4. Use staged rollouts: validate new firmware and kernels on a small number of devices, observe long-run stability and thermal behavior, then roll out broadly.
    5. Keep a rollback path: maintain a compatibility matrix across model, runtime, and firmware versions to support fast rollback.

    7. Conclusion

    Delivering both general-purpose compute and AI compute at the edge is not about stacking peak compute numbers. It is about converging the architecture baseline, drawing a clear line between core roles, and coordinating memory and scheduling. Fusing two core types under one ISA, running a single system, and optimizing deeply around low-precision inference and cache-friendly operators is a viable path to stable, usable compute under power and area constraints.