🚀 Qualcomm AI Engine Direct for JAX

Accelerate JAX on
Snapdragon NPU & GPU

A high-performance OpenXLA PJRT plugin bridging JAX StableHLO representations directly to Qualcomm Hexagon NPUs (45 TOPS), Adreno GPUs, and Oryon CPUs.

Get Started View Architecture
python • quickstart.py JAX with backend="qnn"
import jax
import jax.numpy as jnp
import jax_qnn

# 1. Discover Qualcomm hardware accelerators
print("Available Devices:", jax.devices("qnn"))

# 2. Define JAX Model
@jax.jit
def dense_model(x, w, b):
    return jax.nn.relu(jnp.matmul(x, w) + b)

x = jnp.ones((128, 512), dtype=jnp.float32)
w = jnp.ones((512, 512), dtype=jnp.float32)
b = jnp.zeros((512,), dtype=jnp.float32)

# 3. Compile & Execute directly on Qualcomm Hexagon NPU
output = jax.jit(dense_model, backend="qnn")(x, w, b)
print("Output shape:", output.shape)
🧠

45 TOPS Hexagon NPU

Targets Qualcomm HTP (Hexagon Tensor Processor) with Vector Tightly-Coupled Memory (VTCM) allocation for zero-DDR thrashing.

⚡

OpenXLA PJRT Plugin

Built directly against the official OpenXLA PJRT C API standard (GetPjRtApi ABI), ensuring pure upstream JAX compatibility.

🔄

StableHLO Compiler

Converts JAX MLIR / StableHLO operations (dot_general, conv, maximum, broadcast) directly into native QNN execution graphs.

💻

Windows on ARM & Linux

Full support for Windows 11 Copilot+ PCs (MCDM Driver Store) and Linux Snapdragon Developer Kits.

Snapdragon® X Elite Benchmarks

Measured on Qualcomm Snapdragon X Elite (X1E80100) 12-Core Oryon CPU using python examples/benchmark.py.

View Full Benchmarks →
Workload CPU (Measured) QNN Backend (Measured) Speedup
256×256 Dense GEMM + ReLU 0.38 ms 0.42 ms ~1.0x
512×512 Dense GEMM + ReLU 1.83 ms 1.61 ms 1.1x
1024×1024 Dense GEMM + ReLU 6.07 ms 6.12 ms ~1.0x

Explore Examples

Run community examples across Computer Vision, Large Language Models, and Benchmarks.

View All Examples →