サンプルを片っ端から実行していくシリーズ。今回はhello_query_deviceのサンプルを実行してみます。実行結果が長いので記事はOS別に記載します。
サンプルは以下のフォルダになります。C:\Program Files (x86)\IntelSWTools\openvino\inference_engine\samples\python\hello_query_device
実行の前に
サンプルを実行する前に、READMEファイルを確認しておきましょう。このサンプルはOpenVINOで使用出来るデバイスの情報を取得するものなので凄くシンプルです。
モデル
今回のサンプルはモデルは不要です。
環境
以下の環境で確認しました。
OS 名:Microsoft Windows 10 Home システム モデル:NUC7i5BNHXF プロセッサ:[01]: Intel64 Family 6 Model 142 Stepping 9 GenuineIntel ~2208 Mhz
実行
環境変数の設定をしていない場合は、コマンドラインで以下を実行します。
C:¥Program Files (x86)¥IntelSWTools¥openvino¥bin¥setupvars.bat
以下のコマンドでhello_query_deviceを実行します。
cd C:\Program Files (x86)\IntelSWTools\openvino\inference_engine\samples\python\hello_query_device
python hello_query_device.py
実行結果例(NCS2無し)
Available devices: [E:] [BSL] found 0 ioexpander device Device: CPU Metrics: AVAILABLE_DEVICES: SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1 RANGE_FOR_STREAMS: 1, 4 Default values for device configuration keys: CPU_BIND_THREAD: NUMA CPU_THREADS_NUM: 0 CPU_THROUGHPUT_STREAMS: 1 DUMP_EXEC_GRAPH_AS_DOT: DYN_BATCH_ENABLED: NO DYN_BATCH_LIMIT: 0 EXCLUSIVE_ASYNC_REQUESTS: NO PERF_COUNT: NO Device: GNA Metrics: AVAILABLE_DEVICES: GNA_SW SUPPORTED_CONFIG_KEYS: EXCLUSIVE_ASYNC_REQUESTS, GNA_COMPACT_MODE, GNA_DEVICE_MODE, GNA_FIRMWARE_MODEL_IMAGE, GNA_FIRMWARE_MODEL_IMAGE_GENERATION, GNA_LIB_N_THREADS, GNA_PRECISION, GNA_PWL_UNIFORM_DESIGN, GNA_SCALE_FACTOR, PERF_COUNT, SINGLE_THREAD FULL_DEVICE_NAME: GNA_SW SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_CONFIG_KEYS, FULL_DEVICE_NAME, SUPPORTED_METRICS Default values for device configuration keys: EXCLUSIVE_ASYNC_REQUESTS: NO GNA_COMPACT_MODE: NO GNA_DEVICE_MODE: GNA_AUTO GNA_FIRMWARE_MODEL_IMAGE: GNA_FIRMWARE_MODEL_IMAGE_GENERATION: GNA_LIB_N_THREADS: 1 GNA_PRECISION: I8 GNA_PWL_UNIFORM_DESIGN: YES GNA_SCALE_FACTOR: 1.0 PERF_COUNT: NO SINGLE_THREAD: YES Device: GPU Metrics: AVAILABLE_DEVICES: 0 SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Iris(R) Plus Graphics 640 OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8 SUPPORTED_CONFIG_KEYS: CLDNN_MEM_POOL, CLDNN_NV12_TWO_INPUTS, CLDNN_PLUGIN_PRIORITY, CLDNN_PLUGIN_THROTTLE, DEVICE_ID, DUMP_KERNELS, DYN_BATCH_ENABLED, EXCLUSIVE_ASYNC_REQUESTS, GPU_THROUGHPUT_STREAMS, PERF_COUNT, TUNING_MODE RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1 RANGE_FOR_STREAMS: 1, 2 Default values for device configuration keys: CLDNN_MEM_POOL: YES CLDNN_NV12_TWO_INPUTS: NO CLDNN_PLUGIN_PRIORITY: 0 CLDNN_PLUGIN_THROTTLE: 0 DEVICE_ID: DUMP_KERNELS: NO DYN_BATCH_ENABLED: NO EXCLUSIVE_ASYNC_REQUESTS: NO GPU_THROUGHPUT_STREAMS: 1 PERF_COUNT: NO TUNING_MODE: TUNING_DISABLED
実行結果例(NCS2 1本)
Available devices: [E:] [BSL] found 0 ioexpander device Device: CPU Metrics: AVAILABLE_DEVICES: SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1 RANGE_FOR_STREAMS: 1, 4 Default values for device configuration keys: CPU_BIND_THREAD: NUMA CPU_THREADS_NUM: 0 CPU_THROUGHPUT_STREAMS: 1 DUMP_EXEC_GRAPH_AS_DOT: DYN_BATCH_ENABLED: NO DYN_BATCH_LIMIT: 0 EXCLUSIVE_ASYNC_REQUESTS: NO PERF_COUNT: NO Device: GNA Metrics: AVAILABLE_DEVICES: GNA_SW SUPPORTED_CONFIG_KEYS: EXCLUSIVE_ASYNC_REQUESTS, GNA_COMPACT_MODE, GNA_DEVICE_MODE, GNA_FIRMWARE_MODEL_IMAGE, GNA_FIRMWARE_MODEL_IMAGE_GENERATION, GNA_LIB_N_THREADS, GNA_PRECISION, GNA_PWL_UNIFORM_DESIGN, GNA_SCALE_FACTOR, PERF_COUNT, SINGLE_THREAD FULL_DEVICE_NAME: GNA_SW SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_CONFIG_KEYS, FULL_DEVICE_NAME, SUPPORTED_METRICS Default values for device configuration keys: EXCLUSIVE_ASYNC_REQUESTS: NO GNA_COMPACT_MODE: NO GNA_DEVICE_MODE: GNA_AUTO GNA_FIRMWARE_MODEL_IMAGE: GNA_FIRMWARE_MODEL_IMAGE_GENERATION: GNA_LIB_N_THREADS: 1 GNA_PRECISION: I8 GNA_PWL_UNIFORM_DESIGN: YES GNA_SCALE_FACTOR: 1.0 PERF_COUNT: NO SINGLE_THREAD: YES Device: GPU Metrics: AVAILABLE_DEVICES: 0 SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Iris(R) Plus Graphics 640 OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8 SUPPORTED_CONFIG_KEYS: CLDNN_MEM_POOL, CLDNN_NV12_TWO_INPUTS, CLDNN_PLUGIN_PRIORITY, CLDNN_PLUGIN_THROTTLE, DEVICE_ID, DUMP_KERNELS, DYN_BATCH_ENABLED, EXCLUSIVE_ASYNC_REQUESTS, GPU_THROUGHPUT_STREAMS, PERF_COUNT, TUNING_MODE RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1 RANGE_FOR_STREAMS: 1, 2 Default values for device configuration keys: CLDNN_MEM_POOL: YES CLDNN_NV12_TWO_INPUTS: NO CLDNN_PLUGIN_PRIORITY: 0 CLDNN_PLUGIN_THROTTLE: 0 DEVICE_ID: DUMP_KERNELS: NO DYN_BATCH_ENABLED: NO EXCLUSIVE_ASYNC_REQUESTS: NO GPU_THROUGHPUT_STREAMS: 1 PERF_COUNT: NO TUNING_MODE: TUNING_DISABLED Device: MYRIAD Metrics: AVAILABLE_DEVICES: 1.2-ma2480 DEVICE_THERMAL: UNSUPPORTED TYPE OPTIMIZATION_CAPABILITIES: FP16 FULL_DEVICE_NAME: Intel Movidius Myriad X VPU SUPPORTED_METRICS: AVAILABLE_DEVICES, DEVICE_THERMAL, OPTIMIZATION_CAPABILITIES, FULL_DEVICE_NAME, SUPPORTED_METRICS, RANGE_FOR_ASYNC_INFER_REQUESTS, SUPPORTED_CONFIG_KEYS RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1 SUPPORTED_CONFIG_KEYS: VPU_IGNORE_IR_STATISTIC, VPU_PRINT_RECEIVE_TENSOR_TIME, LOG_LEVEL, VPU_HW_STAGES_OPTIMIZATION, EXCLUSIVE_ASYNC_REQUESTS, VPU_CUSTOM_LAYERS, VPU_MYRIAD_FORCE_RESET, VPU_MYRIAD_PLATFORM, PERF_COUNT, CONFIG_FILE, DEVICE_ID Default values for device configuration keys: VPU_IGNORE_IR_STATISTIC: OFF VPU_PRINT_RECEIVE_TENSOR_TIME: OFF LOG_LEVEL: LOG_NONE VPU_HW_STAGES_OPTIMIZATION: ON EXCLUSIVE_ASYNC_REQUESTS: OFF VPU_CUSTOM_LAYERS: VPU_MYRIAD_FORCE_RESET: OFF VPU_MYRIAD_PLATFORM: PERF_COUNT: OFF CONFIG_FILE: DEVICE_ID:
実行結果例(NCS2 2本)
Available devices: [E:] [BSL] found 0 ioexpander device Device: CPU Metrics: AVAILABLE_DEVICES: SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1 RANGE_FOR_STREAMS: 1, 4 Default values for device configuration keys: CPU_BIND_THREAD: NUMA CPU_THREADS_NUM: 0 CPU_THROUGHPUT_STREAMS: 1 DUMP_EXEC_GRAPH_AS_DOT: DYN_BATCH_ENABLED: NO DYN_BATCH_LIMIT: 0 EXCLUSIVE_ASYNC_REQUESTS: NO PERF_COUNT: NO Device: GNA Metrics: AVAILABLE_DEVICES: GNA_SW SUPPORTED_CONFIG_KEYS: EXCLUSIVE_ASYNC_REQUESTS, GNA_COMPACT_MODE, GNA_DEVICE_MODE, GNA_FIRMWARE_MODEL_IMAGE, GNA_FIRMWARE_MODEL_IMAGE_GENERATION, GNA_LIB_N_THREADS, GNA_PRECISION, GNA_PWL_UNIFORM_DESIGN, GNA_SCALE_FACTOR, PERF_COUNT, SINGLE_THREAD FULL_DEVICE_NAME: GNA_SW SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_CONFIG_KEYS, FULL_DEVICE_NAME, SUPPORTED_METRICS Default values for device configuration keys: EXCLUSIVE_ASYNC_REQUESTS: NO GNA_COMPACT_MODE: NO GNA_DEVICE_MODE: GNA_AUTO GNA_FIRMWARE_MODEL_IMAGE: GNA_FIRMWARE_MODEL_IMAGE_GENERATION: GNA_LIB_N_THREADS: 1 GNA_PRECISION: I8 GNA_PWL_UNIFORM_DESIGN: YES GNA_SCALE_FACTOR: 1.0 PERF_COUNT: NO SINGLE_THREAD: YES Device: GPU Metrics: AVAILABLE_DEVICES: 0 SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS FULL_DEVICE_NAME: Intel(R) Iris(R) Plus Graphics 640 OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8 SUPPORTED_CONFIG_KEYS: CLDNN_MEM_POOL, CLDNN_NV12_TWO_INPUTS, CLDNN_PLUGIN_PRIORITY, CLDNN_PLUGIN_THROTTLE, DEVICE_ID, DUMP_KERNELS, DYN_BATCH_ENABLED, EXCLUSIVE_ASYNC_REQUESTS, GPU_THROUGHPUT_STREAMS, PERF_COUNT, TUNING_MODE RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1 RANGE_FOR_STREAMS: 1, 2 Default values for device configuration keys: CLDNN_MEM_POOL: YES CLDNN_NV12_TWO_INPUTS: NO CLDNN_PLUGIN_PRIORITY: 0 CLDNN_PLUGIN_THROTTLE: 0 DEVICE_ID: DUMP_KERNELS: NO DYN_BATCH_ENABLED: NO EXCLUSIVE_ASYNC_REQUESTS: NO GPU_THROUGHPUT_STREAMS: 1 PERF_COUNT: NO TUNING_MODE: TUNING_DISABLED Device: MYRIAD.1.2-ma2480 Metrics: AVAILABLE_DEVICES: 1.2-ma2480, 3.4-ma2480 DEVICE_THERMAL: UNSUPPORTED TYPE OPTIMIZATION_CAPABILITIES: FP16 FULL_DEVICE_NAME: Intel Movidius Myriad X VPU SUPPORTED_METRICS: AVAILABLE_DEVICES, DEVICE_THERMAL, OPTIMIZATION_CAPABILITIES, FULL_DEVICE_NAME, SUPPORTED_METRICS, RANGE_FOR_ASYNC_INFER_REQUESTS, SUPPORTED_CONFIG_KEYS RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1 SUPPORTED_CONFIG_KEYS: VPU_IGNORE_IR_STATISTIC, VPU_PRINT_RECEIVE_TENSOR_TIME, LOG_LEVEL, VPU_HW_STAGES_OPTIMIZATION, EXCLUSIVE_ASYNC_REQUESTS, VPU_CUSTOM_LAYERS, VPU_MYRIAD_FORCE_RESET, VPU_MYRIAD_PLATFORM, PERF_COUNT, CONFIG_FILE, DEVICE_ID Default values for device configuration keys: VPU_IGNORE_IR_STATISTIC: OFF VPU_PRINT_RECEIVE_TENSOR_TIME: OFF LOG_LEVEL: LOG_NONE VPU_HW_STAGES_OPTIMIZATION: ON EXCLUSIVE_ASYNC_REQUESTS: OFF VPU_CUSTOM_LAYERS: VPU_MYRIAD_FORCE_RESET: OFF VPU_MYRIAD_PLATFORM: PERF_COUNT: OFF CONFIG_FILE: DEVICE_ID: Device: MYRIAD.3.4-ma2480 Metrics: AVAILABLE_DEVICES: 1.2-ma2480, 3.4-ma2480 DEVICE_THERMAL: UNSUPPORTED TYPE OPTIMIZATION_CAPABILITIES: FP16 FULL_DEVICE_NAME: Intel Movidius Myriad X VPU SUPPORTED_METRICS: AVAILABLE_DEVICES, DEVICE_THERMAL, OPTIMIZATION_CAPABILITIES, FULL_DEVICE_NAME, SUPPORTED_METRICS, RANGE_FOR_ASYNC_INFER_REQUESTS, SUPPORTED_CONFIG_KEYS RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1 SUPPORTED_CONFIG_KEYS: VPU_IGNORE_IR_STATISTIC, VPU_PRINT_RECEIVE_TENSOR_TIME, LOG_LEVEL, VPU_HW_STAGES_OPTIMIZATION, EXCLUSIVE_ASYNC_REQUESTS, VPU_CUSTOM_LAYERS, VPU_MYRIAD_FORCE_RESET, VPU_MYRIAD_PLATFORM, PERF_COUNT, CONFIG_FILE, DEVICE_ID Default values for device configuration keys: VPU_IGNORE_IR_STATISTIC: OFF VPU_PRINT_RECEIVE_TENSOR_TIME: OFF LOG_LEVEL: LOG_NONE VPU_HW_STAGES_OPTIMIZATION: ON EXCLUSIVE_ASYNC_REQUESTS: OFF VPU_CUSTOM_LAYERS: VPU_MYRIAD_FORCE_RESET: OFF VPU_MYRIAD_PLATFORM: PERF_COUNT: OFF CONFIG_FILE: DEVICE_ID:
ちゃんとNCS2が2本分出ていますね。
その他
NCS2を2本利用した時に、電力低下のメッセージが表示されました。セルフパワーのUSBハブの出番です。未だお持ちでない方はぜひ購入ください。USB3.0対応の方が良いですね。NCS2も試してみてくださいね。
フリーのITエンジニア(何でも屋さん)。趣味は渓流釣り、サッカー観戦、インラインホッケー、アイスホッケー、RaspberryPiを使った工作など。AI活用に興味があり試行錯誤中です。