module tools.onnx_inference_ort_helper#

Short summary#

module mlprodict.tools.onnx_inference_ort_helper

Helpers for onnxruntime.

source on GitHub

Functions#

function

truncated documentation

device_to_providers

Returns the corresponding providers for a specific device.

get_ort_device

Converts device into C_OrtDevice.

Documentation#

Helpers for onnxruntime.

source on GitHub

mlprodict.tools.onnx_inference_ort_helper.device_to_providers(device)#

Returns the corresponding providers for a specific device.

Parameters

deviceC_OrtDevice

Returns

providers

source on GitHub

mlprodict.tools.onnx_inference_ort_helper.get_ort_device(device)#

Converts device into C_OrtDevice.

Parameters

device – any type

Returns

C_OrtDevice

Example:

get_ort_device('cpu')
get_ort_device('gpu')
get_ort_device('cuda')
get_ort_device('cuda:0')

source on GitHub