UniSal (rdroste), visual saliency prediction — a heatmap of where humans
look in an image — converted to LiteRT and running fully on the CompiledModel GPU (ML Drift) on
Android. MobileNetV2 encoder + bilinear decoder, 3.71 M params / 6.5 MB fp16.
UniSal — saliency heatmap on-device LiteRT GPU
On-device (Pixel 8a, Tensor G3 — verified)
nodes on GPU
158 / 158 LITERT_CL (full residency)
inference
~3 ms (256×256)
size
6.5 MB (fp16)
accuracy
device-vs-PyTorch corr 0.9998
image[1,3,256,256] (ImageNet mean/std) →[GPU: UniSal]→ saliency[1,1,256,256] (higher = more attended)
Minimal usage
Android (Kotlin, CompiledModel GPU)
kotlin
1val model = CompiledModel.create(context.assets,"unisal_fp16.tflite",2 CompiledModel.Options(Accelerator.GPU),null)3val inputs = model.createInputBuffers()4val outputs = model.createOutputBuffers()5inputs[0].writeFloat(chw)// [1,3,256,256] ImageNet-normalized, NCHW6model.run(inputs, outputs)7val sal = outputs[0].readFloat()// [1,1,256,256] saliency (higher = more attended)
Measured on a Pixel 8a (Tensor G3, Android 16) with the standard TFLite benchmark_model tool — 10 warm-up runs then 50 timed runs, reported as the tool's mean.
Runtime
Backend
Graph on GPU
Latency
LiteRT CompiledModel (LITERT_CL)
GPU
158 / 158
~3 ms
TFLite benchmark_model (TfLiteGpuDelegateV2)
GPU (OpenCL)
158 / 158
20.2 ms
TFLite benchmark_model
CPU (XNNPACK, 4 threads)
—
XNNPACK declined the graph
The two GPU rows are different runtimes, not a contradiction. The LITERT_CL figure is the one recorded when this model shipped, taken through LiteRT's own CompiledModel accelerator — the path the Kotlin sample app and the LiteRT API use. The TfLiteGpuDelegateV2 figure is the classic TFLite OpenCL delegate, measured with a tool anyone can download and re-run. They agree on how much of the graph the GPU takes; they disagree on speed, and the classic delegate is the slower of the two here. Read the TfLiteGpuDelegateV2 row as a reproducible floor, not as this model's speed on LiteRT.
XNNPACK declines these fp16 graphs — it reports failed to delegate DEPTHWISE_CONV_2D and then fails to allocate tensors — so there is no usable CPU number. Disabling XNNPACK falls back to reference kernels, which measured about 20× slower than the GPU on models of this size and would not represent CPU inference anyone would ship.
Snapdragon NPU (Hexagon)
The GPU is faster: 3.66 ms against 21.12 ms on the NPU, a factor of 5.77. The NPU still loads 21x faster (103 ms against 2136 ms).
backend
compiled
inference (median / min)
load
NPU (Hexagon v81)
on-device JIT
21.12 ms / 20.65 ms
103 ms
GPU (Adreno)
—
3.66 ms / 3.46 ms
2136 ms
Measured on a Samsung Galaxy S26 (Snapdragon 8 Elite Gen 5 / SM8850, Hexagon v81, Android 16) with LiteRT CompiledModel 2.2.0, one accelerator per process, 5 warm-up runs then N=50 timed runs, median reported. Every run held thermal status NONE throughout. Headroom 0.76, where 1.0 is the throttling threshold.
The NPU rows ran the published file unchanged. LiteRT compiled it for the Hexagon on the device at first load. That first compile took 937 ms here. The load column above is the cached load every later run pays. Recipe and the runtime libraries it needs: NPU guide.
Measured on a Raspberry Pi 5 Model B Rev 1.1 (8 GB, Raspberry Pi OS 64-bit) with the LiteRT benchmark_model tool from litert-cli-nightly 0.2.0.dev20260805: CPU inference (XNNPACK, 4 threads), 3 invocations per file of 10 warm-up plus 50 timed runs (the tool caps a phase at 150 s, so very slow graphs run fewer — the Runs column is the actual timed total). The latency is the median across invocations; the spread is the min–max over all timed runs. No thermal throttling occurred during these runs (vcgencmd get_throttled stayed 0x0).