Design an Inference Runtime That Partitions Models Across CPU, GPU and NPU
Last updated: November 29, 2026
Quick Overview
Design an on-device inference runtime for Android phones with Cortex-A CPU clusters, a Mali GPU and an NPU that takes a model graph, partitions it across the available processors, and minimises latency and energy while staying correct when some operators are unsupported.
Arm
November 29, 20260
0
0 solved
Design an on-device inference runtime for Android phones with Cortex-A CPU clusters, a Mali GPU and an NPU that takes a model graph, partitions it across the available processors, and minimises latency and energy while staying correct when some operators are unsupported.
Arm builds Arm NN, the Arm Compute Library and KleidiAI kernels that sit underneath frameworks like TensorFlow Lite, ExecuTorch and llama.cpp on billions of phones. The interviewer checks graph partitioning, cost modelling, memory movement and the practical realities of heterogeneous mobile SoCs such as thermal limits and big.LITTLE scheduling.
What the Interviewer Expects
- Define backends with capability queries and cost models
- Partition the graph into subgraphs per backend while minimising transfers
- Plan memory with zero-copy buffers where hardware allows
- Pick CPU kernels per core type and data type (int8, fp16, bf16 with I8MM/SME)
- Handle fallback, warm-up and compilation caching
- Measure and adapt to thermal throttling and contention
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you handle a large language model where the KV cache dominates memory?
- How would you decide between running a layer on two big cores versus the GPU?
- How do you validate numerical correctness across backends with different rounding?
- What changes for a real-time camera pipeline with a 33 ms frame budget?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Input: a model graph (TFLite or ExecuTorch) with int8, fp16 or fp32 ops. Output: an execution plan and a runtime that executes it. Targets: minimise p95 latency for interactive models and energy for b...
High-Level Design
Components: (1) Backend plugins for CPU (Compute Library and KleidiAI microkernels), GPU (OpenCL or Vulkan kernels on Mali) and NPU (vendor driver). Each exposes supports(op, dtype, shape) and `esti...