Skip to content

get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_paramT_get_dl_device_param🔗

説明🔗

get_dl_device_paramGetDlDeviceParamGetDlDeviceParamget_dl_device_paramT_get_dl_device_param — ディープラーニングに対応しているハードウェアデバイスのパラメータを返します。

書式🔗

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 )

説明🔗

get_dl_device_paramGetDlDeviceParam は、ディープラーニング対応のハードウェアデバイス (以下、デバイスと呼ぶ)DLDeviceHandleDLDeviceHandledldevice_handleのパラメータ名GenParamNamegenParamNamegen_param_name の パラメータ値GenParamValuegenParamValuegen_param_value を返します。 ディープラーニングに対応しているデバイスの詳細については、 query_available_dl_devicesQueryAvailableDlDevicesを参照してください。

GenParamNamegenParamNamegen_param_nameは以下をサポートしています:

  • 'calibration_precisions'"calibration_precisions": ディープラーニングモデルのキャリブレーションに使用できるユニットデータタイプを指定します。

    値のリスト: 'int8'"int8".

  • 'cast_precisions'"cast_precisions": ディープラーニングモデルのキャストに使用できるユニットデータタイプを指定します。

    データタイプを変更しても、キャリブレーションに画像は必要ありません。

    値のリスト: 'bfloat16'"bfloat16", 'float32'"float32", 'float16'"float16".

  • 'conversion_supported'"conversion_supported": ディープラーニングモデルのキャリブレーションまたはキャストのいずれかのユニットデータタイプが利用可能な場合、'true'"true"を返します。 それ以外の場合は、'false'"false"を返します。

  • 'id'"id": デバイスのID。各AI²-インターフェイスにおいて、サポートされているデバイスのIDは一意です。 HALCONでサポートされているデバイスについても同様です。

  • 'inference_only'"inference_only": デバイスがディープラーニングモデルの推論にしか使用できないか('true'"true") 、 学習または勾配ベースの演算をサポートしているか('false'"false")を示します。

  • 'ai2'"ai2": このユニットDLDeviceHandleDLDeviceHandledldevice_handleが実行されるAI Accelerator Interface (AI²) 。 デバイスがHALCONで直接サポートされている場合は、値'none'"none" が返されます。

    値のリスト: 'tensorrt'"tensorrt", 'openvino'"openvino", 'none'"none"。

  • 'ai_accelerator_interface'"ai_accelerator_interface": 警告

    'ai_accelerator_interface'"ai_accelerator_interface" は廃止され、下位互換のためだけに提供されています。 新しいアプリケーションでは代わりに 'ai2'"ai2" を使用してください。

  • 'info'"info": デバイスの追加情報を含むディクショナリ。 制限: AI²-インターフェースでサポートされているデバイスのみ対象です。

  • 'name'"name": デバイスの名前

  • 'optimize_for_inference_params'"optimize_for_inference_params": ディープラーニングモデルのキャリブレーションやキャスト操作のための変換パラメータが デフォルトで定義されているディクショナリです。エントリーは変更可能です。

    設定されたデバイスに該当するパラメータがない場合には、空のディクショナリが返されます。

    制限: AI²-インターフェースでサポートされているデバイスのみ対象です。

  • 'precisions'"precisions": ディープラーニングベースのモデルの重みやアクティベーションに対して、ユニットがサポートするデータタイプを指定します。

    値のリスト: 'bfloat16'"bfloat16", 'float32'"float32", 'float16'"float16", 'int8'"int8".

  • 'settable_device_params'"settable_device_params": 設定可能なデバイスパラメータとしてのディクショナリ。

    制限: AI²-インターフェイスでサポートされているデバイスのみ対象です。

  • 'type'"type": デバイスのタイプ

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

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

対応しているハードウェアデバイスのハンドル

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

パラメータの名前

初期値: 'type'"type"
値のリスト: '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)

パラメータの値

結果🔗

パラメータ値が正しい場合、get_dl_device_paramGetDlDeviceParam は2 (H_MSG_TRUE)を返します。 必要に応じて例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

query_available_dl_devicesQueryAvailableDlDevices

後処理の候補

set_dl_model_paramSetDlModelParam

モジュール🔗

Foundation