device_to_providers()

audonnx.device_to_providers(device)[source]

Converts device into a list of providers.

Parameters

device (Union[str, Tuple[str, Dict], Sequence[Union[str, Tuple[str, Dict]]]]) – 'cpu', 'cuda', 'cuda:<id>', or a (list of) ONNX Runtime Execution Providers

Return type

Sequence[Union[str, Tuple[str, Dict]]]

Returns

sequence of ONNX Runtime Execution Providers

Examples

>>> device_to_providers('cpu')
['CPUExecutionProvider']