ML Drift is released - what it is and who it is for
Google released ML Drift. It is an open-source GPU engine for on-device AI. The company built it to replace the legacy TensorFlow Lite GPU delegate. ML Drift runs on diverse hardware. It abstracts the complexity of different GPU hardware and low-level APIs. Developers use it to build custom graphics and inference runtimes. The engine powers LiteRT. LiteRT is a machine learning runtime. ML Drift supports OpenGL ES, OpenCL, Metal, and WebGPU. It is licensed under Apache 2.0. This means developers can use it for free. They can change the code to fit their needs. Google open-sourced ML Drift to help teams build applications for edge devices. Edge devices are small computers like phones or cameras. They run apps without a cloud connection. ML Drift targets traditional computer vision, audio, and depth processing. It also targets generative AI. Generative AI creates new content like images or text. Developers face a wide range of GPU architectures. They also face different driver versions and low-level APIs. They do not know in advance which hardware their app will run on. ML Drift aims to simplify access to this hardware. It establishes a new foundation for portability and performance. Google says it delivers stability for traditional ML. It also delivers peak performance for advanced generative AI.
How ML Drift works - technical improvements and supported APIs
ML Drift introduces several technical improvements over the legacy TFLite GPU delegate. It uses unified shaders through tensor virtualization. Tensor virtualization allows a single shader to handle different data shapes. This makes the code more efficient. It also adds extensible custom operations. Developers can add their own operations to the GPU graph. The engine supports five-dimensional tensor support. A tensor is a multi-dimensional array of numbers. Five dimensions are useful for spatial and transformer models. These models process images and text. ML Drift incorporates hardware-specific optimizations. It targets GPUs from Arm, Intel, and Qualcomm Technologies. These optimizations maximize hardware utilization across modern GPUs. The engine extends desktop support for inference on Windows and Linux. It uses Dawn. Dawn is Chromium's WebGPU implementation. Dawn provides a unified API model. It leverages WebGPU's hardware abstraction layer. This avoids the need to interface directly with platform-specific graphics APIs. These APIs include DirectX and Vulkan. ML Drift retains native Metal backend support on macOS. Metal is Apple's graphics framework. This allows it to run efficiently on iPhones and Macs. The engine decouples logical tensors from physical memory allocations. This reduces memory fragmentation during live inference. Fragmentation happens when memory gets split into small, unusable pieces.