Native Model Authoring for Edge with LiteRT Tensor API
Blog post from Google Cloud
LiteRT Tensor API is a new C++ authoring layer for creating and optimizing on-device AI computation graphs with low-level control while retaining portability across CPU, GPU, and NPU backends. Although model conversion from frameworks such as PyTorch remains the recommended default deployment path, the API targets developers who need to manually define architectures, optimization logic, and complete accelerator-resident pipelines without rewriting code for each hardware platform. It supports direct checkpoint weight loading, graph construction from individual operators, shared tensor buffers that avoid CPU round trips between preprocessing, inference, and post-processing, and direct execution through XNNPACK or export to .tflite for LiteRT. Google demonstrated the approach with an open-source, browser-based SAM 2 segmentation application authored entirely in C++, which runs through WebGPU and reportedly exceeded 30 frames per second at 512×512 after agent-assisted graph optimizations while matching PyTorch reference outputs. Benchmarking across macOS, iOS, and Android GPUs showed the same code could run on Metal and OpenCL, with a reported 1.5× speed improvement over Apple MLX on a MacBook Pro for the tested encoder and decoder. Planned additions include direct ML Drift GPU support, NPU-oriented operations, automated graph quantization, Python authoring, and broader dynamic-shape support.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.