Skip to main content

Module device

Module device 

Source
Expand description

High-level compute device enumeration and selection.

Provides a user-facing interface for discovering and selecting compute devices (CPU, CUDA, CoreML, DirectML) for ONNX Runtime inference.

This module operates at the application layer – it handles user input parsing, device discovery, and display formatting. The actual ONNX Runtime ExecutionProvider configuration lives in crate::gpu, which is the low-level ort integration layer. Use From<DeviceSelection> to convert a high-level selection into a crate::gpu::DeviceType suitable for passing to crate::gpu::configure_session_builder.

Structs§

DeviceInfo
Information about a compute device.
DeviceSelection
Device selection specification.

Enums§

DeviceKind
Compute device type.

Functions§

enumerate_devices
Enumerate all available compute devices on this system.
is_device_available
Check if a specific device kind is available.
recommended_device
Get the recommended device for this platform.