NpuAcceleratorProvider

interface NpuAcceleratorProvider

Known direct subclasses
BuiltinNpuAcceleratorProvider

An implementation of NpuAcceleratorProvider, which provides the NPU libraries without dynamic downloading.


An interface to provide the NPU libraries.

Summary

Public functions

suspend Unit

Downloads the NPU library if needed.

String

Returns the local directory of the NPU library.

Boolean

Returns true if the device is compatible with NPU library..

Boolean

Returns true if the NPU library is ready to use.

Public functions

downloadLibrary

suspend fun downloadLibrary(): Unit

Downloads the NPU library if needed.

getLibraryDir

fun getLibraryDir(): String

Returns the local directory of the NPU library.

isDeviceSupported

fun isDeviceSupported(): Boolean

Returns true if the device is compatible with NPU library..

isLibraryReady

fun isLibraryReady(): Boolean

Returns true if the NPU library is ready to use.