ExecutionProvider

sealed class ExecutionProvider

These are classes representing the supported ONNXRuntime execution providers for KotlinDL. The supported providers are:

  • CPU (default)

  • CUDA (could be used if the CUDA runtime is installed)

  • NNAPI (could be used on Android if the NNAPI runtime is supported)

Internally, the OrtProvider enum is used to indicate the provider.

Parameters

internalProviderId

the OrtProvider enum value

Types

CPU
Link copied to clipboard
common
data class CPU(useBFCArenaAllocator: Boolean) : ExecutionProvider

Default CPU execution provider. Available on all platforms.

CUDA
Link copied to clipboard
common
data class CUDA(deviceId: Int) : ExecutionProvider

CUDA execution provider. Available only on platforms with Nvidia gpu and CUDA runtime installed.

NNAPI
Link copied to clipboard
common
data class NNAPI(flags: Set<<ERROR CLASS>>) : ExecutionProvider

NNAPI execution provider. Available only on Android.

Functions

addOptionsTo
Link copied to clipboard
common
open fun addOptionsTo(sessionOptions: <ERROR CLASS>)

Adds execution provider options to the OrtSession.SessionOptions.

Properties

internalProviderId
Link copied to clipboard
common
val internalProviderId: <ERROR CLASS>

Inheritors

ExecutionProvider
Link copied to clipboard
ExecutionProvider
Link copied to clipboard
ExecutionProvider
Link copied to clipboard