pub fn configure_session_builder(
builder: SessionBuilder,
device: &DeviceType,
) -> Result<(SessionBuilder, DeviceType), PiperError>Expand description
Configure an ONNX Runtime session builder with the appropriate ExecutionProvider.
Returns the builder and the device actually used (may fall back to CPU if the requested provider is unavailable or registration fails).
Uses ort v2 API:
ⓘ
use ort::ep;
let builder = Session::builder()?
.with_execution_providers([ep::CUDA::default().build()])?;