|
rustnn C and C++ API
WebNN graph construction and execution
|
Classes | |
| struct | BackendDevice |
| Explicit backend and device hint for context creation. More... | |
| class | Error |
| Exception containing the C API's failure message. More... | |
| class | MLContext |
| Owns a backend context for graph compilation, tensors and dispatch. More... | |
| struct | MLContextOptions |
| Backend selection and runtime configuration for MLContext. More... | |
| class | MLGraph |
| Owns a compiled graph. Its originating context must outlive it. More... | |
| class | MLGraphBuilder |
| Records and validates graph operations. More... | |
| class | MLOperand |
| Owns an operand handle belonging to a graph builder. More... | |
| class | MLOperandDescriptor |
| Owns an operand's element type and shape descriptor. More... | |
| struct | MLOperatorOptions |
| Optional operator label used in diagnostics. More... | |
| class | MLTensor |
| Owns a backend tensor. Its originating context must outlive it. More... | |
| class | MLTensorDescriptor |
| Owns a tensor descriptor with host read and write permissions. More... | |
| struct | RustNNOptions |
| rustnn-specific backend configuration. More... | |
| struct | TrtxOptions |
| TensorRT-RTX engine caching and execution options. More... | |
Enumerations | |
| enum class | MLOperandDataType { Float32 = RustnnDataType_Float32 , Float16 = RustnnDataType_Float16 , Int32 = RustnnDataType_Int32 , Uint32 = RustnnDataType_Uint32 , Int64 = RustnnDataType_Int64 , Uint64 = RustnnDataType_Uint64 , Int8 = RustnnDataType_Int8 , Uint8 = RustnnDataType_Uint8 , Int4 = RustnnDataType_Int4 , Uint4 = RustnnDataType_Uint4 } |
| Element type, including packed signed and unsigned 4-bit integers. More... | |
| enum class | MLPowerPreference { Default = RustnnPowerPreference_Default , HighPerformance = RustnnPowerPreference_HighPerformance , LowPower = RustnnPowerPreference_LowPower } |
| Power preference used for automatic backend selection. More... | |
| enum class | Backend { Automatic = RustnnBackend_Automatic , Onnx = RustnnBackend_Onnx , Trtx = RustnnBackend_Trtx , Coreml = RustnnBackend_Coreml , Litert = RustnnBackend_Litert , Cann = RustnnBackend_Cann } |
| Backend hint; Automatic delegates selection to rustnn. More... | |
| enum class | DeviceType { Cpu = RustnnDeviceType_Cpu , Gpu = RustnnDeviceType_Gpu , Npu = RustnnDeviceType_Npu } |
| Kind of device used to execute a graph. More... | |
Functions | |
| void | initializeLogger () |
| Initialize rustnn's logger using the environment configuration. | |
| void | check (RustnnStatus status) |
| Throw Error if a C API call returned a failing status. | |
|
strong |
Backend hint; Automatic delegates selection to rustnn.
| Enumerator | |
|---|---|
| Automatic | |
| Onnx | |
| Trtx | |
| Coreml | |
| Litert | |
| Cann | |
Definition at line 62 of file rustnn.hpp.
|
strong |
Kind of device used to execute a graph.
| Enumerator | |
|---|---|
| Cpu | |
| Gpu | |
| Npu | |
Definition at line 72 of file rustnn.hpp.
|
strong |
Element type, including packed signed and unsigned 4-bit integers.
| Enumerator | |
|---|---|
| Float32 | |
| Float16 | |
| Int32 | |
| Uint32 | |
| Int64 | |
| Uint64 | |
| Int8 | |
| Uint8 | |
| Int4 | |
| Uint4 | |
Definition at line 41 of file rustnn.hpp.
|
strong |
Power preference used for automatic backend selection.
| Enumerator | |
|---|---|
| Default | |
| HighPerformance | |
| LowPower | |
Definition at line 55 of file rustnn.hpp.
|
inline |
Throw Error if a C API call returned a failing status.
Definition at line 33 of file rustnn.hpp.
|
inline |
Initialize rustnn's logger using the environment configuration.
Definition at line 24 of file rustnn.hpp.