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
- Returns
sequence of ONNX Runtime Execution Providers
Examples
>>> device_to_providers('cpu') ['CPUExecutionProvider']