get_dl_device_paramT_get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_param (算子)
名称
get_dl_device_paramT_get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_param — 返回具有深度学习功能的硬件设备的参数。
签名
描述
get_dl_device_paramget_dl_device_paramGetDlDeviceParamGetDlDeviceParamGetDlDeviceParamget_dl_device_param returns the parameter values
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value of GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name for the
deep-learning-capable hardware device (hereafter referred to as device)
DLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandledldevice_handle.
See query_available_dl_devicesquery_available_dl_devicesQueryAvailableDlDevicesQueryAvailableDlDevicesQueryAvailableDlDevicesquery_available_dl_devices for details about
deep-learning-capable hardware devices.
Supported values for GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name are:
- 'calibration_precisions'"calibration_precisions""calibration_precisions""calibration_precisions""calibration_precisions""calibration_precisions":
-
Specifies the unit data types that can be used for a calibration
of a deep learning model.
Possible values: 'int8'"int8""int8""int8""int8""int8".
- 'cast_precisions'"cast_precisions""cast_precisions""cast_precisions""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.
Possible values: 'float32'"float32""float32""float32""float32""float32", 'float16'"float16""float16""float16""float16""float16".
- 'conversion_supported'"conversion_supported""conversion_supported""conversion_supported""conversion_supported""conversion_supported":
Returns 'true'"true""true""true""true""true" if unit data types for either a calibration
or a cast of a deep learning model are available. Returns
'false'"false""false""false""false""false" in any other case.
- 'id'"id""id""id""id""id":
The ID of the device. Within each inference
engine, the IDs of its supported devices are unique. The same
holds for devices supported through HALCON.
- 'inference_only'"inference_only""inference_only""inference_only""inference_only""inference_only":
Indicates if the device can only
be used to infer deep learning models ('true'"true""true""true""true""true") or
also supports training or gradient-based operations
('false'"false""false""false""false""false").
- 'ai_accelerator_interface'"ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface":
-
AI Accelerator Interface (AI
2) on which this unit
DLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandledldevice_handle is executed.
In case the device is directly supported by HALCON,
the value 'none'"none""none""none""none""none" is returned.
Possible values: 'tensorrt'"tensorrt""tensorrt""tensorrt""tensorrt""tensorrt", 'openvino'"openvino""openvino""openvino""openvino""openvino",
'none'"none""none""none""none""none".
- 'info'"info""info""info""info""info":
-
Dictionary containing additional information
on the device.
Restriction: Only for devices that are supported via an
AI2-interface.
- 'name'"name""name""name""name""name":
Name of the device.
- 'optimize_for_inference_params'"optimize_for_inference_params""optimize_for_inference_params""optimize_for_inference_params""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""precisions""precisions""precisions""precisions":
-
Specifies the data types that the
unit supports for the weights and/or activations of a
deep-learning-based model.
Possible values: 'float32'"float32""float32""float32""float32""float32",
'float16'"float16""float16""float16""float16""float16", 'int8'"int8""int8""int8""int8""int8".
- 'settable_device_params'"settable_device_params""settable_device_params""settable_device_params""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""type""type""type":
Type of the device.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
DLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandleDLDeviceHandledldevice_handle (输入控制) dl_device → HDlDevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the deep-learning-capable hardware device.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) attribute.name → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the generic parameter.
默认值:
'type'
"type"
"type"
"type"
"type"
"type"
值列表:
'ai_accelerator_interface'"ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface""ai_accelerator_interface", 'calibration_precisions'"calibration_precisions""calibration_precisions""calibration_precisions""calibration_precisions""calibration_precisions", 'cast_precisions'"cast_precisions""cast_precisions""cast_precisions""cast_precisions""cast_precisions", 'conversion_supported'"conversion_supported""conversion_supported""conversion_supported""conversion_supported""conversion_supported", 'id'"id""id""id""id""id", 'inference_only'"inference_only""inference_only""inference_only""inference_only""inference_only", 'info'"info""info""info""info""info", 'name'"name""name""name""name""name", 'optimize_for_inference_params'"optimize_for_inference_params""optimize_for_inference_params""optimize_for_inference_params""optimize_for_inference_params""optimize_for_inference_params", 'precisions'"precisions""precisions""precisions""precisions""precisions", 'settable_device_params'"settable_device_params""settable_device_params""settable_device_params""settable_device_params""settable_device_params", 'type'"type""type""type""type""type"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输出控制) attribute.name(-array) → HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)
Value of the generic parameter.
结果
如果参数有效,算子 get_dl_device_paramget_dl_device_paramGetDlDeviceParamGetDlDeviceParamGetDlDeviceParamget_dl_device_param 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
query_available_dl_devicesquery_available_dl_devicesQueryAvailableDlDevicesQueryAvailableDlDevicesQueryAvailableDlDevicesquery_available_dl_devices
可能的后继
set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParamset_dl_model_param
模块
基础