Skip to content

get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_paramT_get_dl_device_param🔗

Short description🔗

get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_paramT_get_dl_device_param — Return the parameters of a deep-learning-capable hardware device.

Signature🔗

get_dl_device_param( dl_device DLDeviceHandle, attribute.name GenParamName, out attribute.name GenParamValue )void GetDlDeviceParam( const HTuple& DLDeviceHandle, const HTuple& GenParamName, HTuple* GenParamValue )static void HOperatorSet.GetDlDeviceParam( HTuple DLDeviceHandle, HTuple genParamName, out HTuple genParamValue )def get_dl_device_param( dldevice_handle: HHandle, gen_param_name: str ) -> Sequence[Union[str, float, int]]

def get_dl_device_param_s( dldevice_handle: HHandle, gen_param_name: str ) -> Union[str, float, int]Herror T_get_dl_device_param( const Htuple DLDeviceHandle, const Htuple GenParamName, Htuple* GenParamValue )

HTuple HDlDevice::GetDlDeviceParam( const HString& GenParamName ) const

HTuple HDlDevice::GetDlDeviceParam( const char* GenParamName ) const

HTuple HDlDevice::GetDlDeviceParam( const wchar_t* GenParamName ) const (Windows only)

HTuple HDlDevice.GetDlDeviceParam( string genParamName )

Description🔗

get_dl_device_paramGetDlDeviceParam returns the parameter values GenParamValuegenParamValuegen_param_value of GenParamNamegenParamNamegen_param_name for the deep-learning-capable hardware device (hereafter referred to as device) DLDeviceHandleDLDeviceHandledldevice_handle. See query_available_dl_devicesQueryAvailableDlDevices for details about deep-learning-capable hardware devices.

Supported values for GenParamNamegenParamNamegen_param_name are:

  • 'calibration_precisions'"calibration_precisions": Specifies the unit data types that can be used for a calibration of a deep learning model.

    List of values: 'int8'"int8".

  • 'cast_precisions'"cast_precisions": Specifies the unit data types that can be used for a cast of a deep learning model.

    When changing the data type the calibration does not require any images.

    List of values: 'bfloat16'"bfloat16", 'float32'"float32", 'float16'"float16".

  • 'conversion_supported'"conversion_supported": Returns 'true'"true" if unit data types for either a calibration or a cast of a deep learning model are available. Returns 'false'"false" in any other case.

  • 'id'"id": The ID of the device. Within each AI²-Interface, the IDs of its supported devices are unique. The same holds for devices supported through HALCON.

  • 'inference_only'"inference_only": Indicates if the device can only be used to infer deep learning models ('true'"true") or also supports training or gradient-based operations ('false'"false").

  • 'ai2'"ai2": AI Accelerator Interface (AI²) on which this unit DLDeviceHandleDLDeviceHandledldevice_handle is executed. In case the device is directly supported by HALCON, the value 'none'"none" is returned.

    List of values: 'tensorrt'"tensorrt", 'openvino'"openvino", 'none'"none".

  • 'ai_accelerator_interface'"ai_accelerator_interface": warning

    'ai_accelerator_interface'"ai_accelerator_interface" is obsolete and is only provided for reasons of backward compatibility. New applications should use 'ai2'"ai2" instead.

  • 'info'"info": Dictionary containing additional information on the device.

    Restriction: Only for devices that are supported via an AI2-interface.

  • 'name'"name": Name of the device.

  • 'optimize_for_inference_params'"optimize_for_inference_params": Dictionary with default-defined conversion parameters for a calibration or cast operation of a deep learning model. The entries can be changed.

    In case no parameter applies to the set device, an empty dictionary is returned.

    Restriction: Only for devices that are supported via an AI2-interface.

  • 'precisions'"precisions": Specifies the data types that the unit supports for the weights and/or activations of a deep-learning-based model.

    List of values: 'bfloat16'"bfloat16", 'float32'"float32", 'float16'"float16", 'int8'"int8".

  • 'settable_device_params'"settable_device_params": Dictionary with settable device parameters.

    Restriction: Only for devices that are supported via an AI2-interface.

  • 'type'"type": Type of the device.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

DLDeviceHandleDLDeviceHandledldevice_handle (input_control) dl_device → (handle)HTuple (HHandle)HDlDevice, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the deep-learning-capable hardware device.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the generic parameter.

Default: 'type'"type"
List of values: 'ai2', 'calibration_precisions', 'cast_precisions', 'conversion_supported', 'execution_provider', 'id', 'inference_only', 'info', 'name', 'optimize_for_inference_params', 'precisions', 'settable_device_params', 'type'"ai2", "calibration_precisions", "cast_precisions", "conversion_supported", "execution_provider", "id", "inference_only", "info", "name", "optimize_for_inference_params", "precisions", "settable_device_params", "type"

GenParamValuegenParamValuegen_param_value (output_control) attribute.name(-array) → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)Sequence[Union[str, float, int]]Htuple (char* / double / Hlong)

Value of the generic parameter.

Result🔗

If the parameters are valid, the operator get_dl_device_paramGetDlDeviceParam returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

query_available_dl_devicesQueryAvailableDlDevices

Possible successors

set_dl_model_paramSetDlModelParam

Module🔗

Foundation