LiteRT Next は、ベンダー固有のコンパイラ、ランタイム、ライブラリの依存関係を個別に操作することなく、NPU を活用するための統合インターフェースを提供します。NPU アクセラレーションに LiteRT Next を使用すると、ベンダー固有やデバイス固有の複雑さを回避し、リアルタイムおよび大規模モデル推論のパフォーマンスを向上させ、ゼロコピー ハードウェア バッファを使用してメモリコピーを最小限に抑えることができます。
LiteRT で NPU を使用するには、Play for On-device AI(PODAI)を使用してモデルを変換してコンパイルし、Play AI Pack と Feature Module を使用してモデルをデプロイします。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-24 UTC。"],[],[],null,["# Hardware acceleration with LiteRT Next\n\n| **Experimental:** LiteRT Next is an alpha release and under active development.\n\nHardware acceleration is the use of specialized computer hardware to improve the\nexecution speed and efficiency of an AI model. For LiteRT, this primarily\ninvolves using Graphics Processing Units (GPU) or Neural Processing Units (NPU)\nfor AI inference, as well as general-purpose Central Processing Units (CPUs)\nvector instructions.\n\nLiteRT supported hardware acceleration through the use of [TFLite\nDelegates](../performance/delegates), which takes over parts of the LiteRT graph\nby substituting its own operations in the graph. LiteRT Next improves upon this\nprocess by handling hardware acceleration through two steps:\n\n1. **Compilation:** prepare a model to run with a specific hardware.\n2. **Dispatch:** run selected operations on the relevant hardware.\n\nThe compilation phase modifies a LiteRT model with a new interface that offers\nmore flexibility though compiler plugins. Model compilation occurs ahead of time\n(AOT), before the graph is executed, and tailors a specific graph to run on the\ndevice.\n\nTypes of accelerators\n---------------------\n\nLiteRT provides three types of accelerators: NPU, GPU and CPU.\n\n- The NPU acceleration supports specialized hardware unified behind a single interface. NPU support is available through an [Early Access\n Program](https://forms.gle/CoH4jpLwxiEYvDvF6).\n- The GPU acceleration supports WebGL and OpenCL enabled devices.\n- The CPU acceleration supports a variety of processors through the use of the [XNNPack](https://github.com/google/XNNPACK) library. This is the default level of acceleration and is always available.\n\nThese accelerators may be combined to get the best performance possible when\nsome complex operations are not available on a given hardware. When accelerators\ncompete over an operation, LiteRT uses the following order of precedence: NPU,\nGPU, CPU.\n\nGPU acceleration\n----------------\n\nWith LiteRT Next's GPU acceleration, you can create GPU-friendly input and\noutput buffers, achieve zero-copy with your data in GPU memory, and execute\ntasks asynchronously to maximize parallelism. LiteRT Next uses a new and\nimproved GPU delegate, not offered by LiteRT.\n\nRunning models on GPU with LiteRT requires explicit delegate creation, function\ncalls, and graph modifications. With LiteRT Next, just specify the accelerator: \n\n // Create a compiled model targeting GPU\n LITERT_ASSIGN_OR_RETURN(auto compiled_model,\n CompiledModel::Create(env, model, kLiteRtHwAcceleratorGpu));\n\nFor more information on GPU acceleration, see [GPU acceleration with LiteRT\nAcceleration](./gpu)\n\nNPU acceleration\n----------------\n\n| **Note:** LiteRT NPU acceleration is available through an Early Access Program. [Sign up](https://forms.gle/CoH4jpLwxiEYvDvF6).\n\nLiteRT Next provides a unified interface to harness NPUs without forcing you to\nindividually navigate vendor-specific compilers, runtimes, or library\ndependencies. Using LiteRT Next for NPU acceleration avoids many vendor-specific\nand device-specific complications, boosts performance for real-time and\nlarge-model inference, and minimizes memory copies with zero-copy hardware\nbuffer usage.\n\nUsing NPUs with LiteRT involves converting and compiling a model with [Play for\nOn-device AI (PODAI)](https://developer.android.com/google/play/on-device-ai)\nand deploying the model with Play AI Pack and Feature Module."]]