openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.01k stars 2.21k forks source link

[Build]: Cant build model for OpenVINO with "GPU" device specified #23994

Open JasonSloan opened 5 months ago

JasonSloan commented 5 months ago

OpenVINO Version

2023.1.0

Operating System

Ubuntu 22.04 (LTS)

Hardware Architecture

x86 (64 bits)

Target Platform

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Vendor ID: GenuineIntel Model name: 13th Gen Intel(R) Core(TM) i7-13700 CPU family: 6 Model: 183 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 1 Stepping: 1 CPU max MHz: 5200.0000 CPU min MHz: 800.0000 BogoMIPS: 4224.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse s se2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtop ology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 s sse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rd rand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriori ty ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x Caches (sum of all):
L1d: 640 KiB (16 instances) L1i: 768 KiB (16 instances) L2: 24 MiB (10 instances) L3: 30 MiB (1 instance) NUMA:
NUMA node(s): 1 NUMA node0 CPU(s): 0-23 Vulnerabilities:
Gather data sampling: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence Srbds: Not affected Tsx async abort: Not affected

Build issue description

I tried to build a openvino model which aimed to run on the iGPU device.

I have all installed the GPU driver successfully following the official instuctions

I can get the "GPU" output from the code from openvino import Core Core.available_devices image

But when I tried to build an Int8 model with "GPU" device specified, I just couldnt build it successfully.(Inference on "GPU" either) The error msg is below: image

The complete code is uploaded

convert-model.py.gz

Build scrip or step-by-step to reproduce

The complete code is in the uploaded file. convert-model.py.gz

Relevant log output

Traceback (most recent call last):
  File "/root/python/test_int8_quantization.py", line 252, in <module>
    compressed_model = pipeline.run(pot_model)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/pipeline/pipeline.py", line 52, in run
    result = self.collect_statistics_and_run(model, current_algo_seq)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/pipeline/pipeline.py", line 62, in collect_statistics_and_run
    model = algo.run(model)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/algorithms/quantization/default/algorithm.py", line 90, in run
    self.algorithms[1].algo_collector.compute_statistics(model)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/statistics/collector.py", line 75, in compute_statistics
    _, stats_ = self._engine.predict(combined_stats, sampler, stat_aliases_)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/engines/ie_engine.py", line 120, in predict
    self._predict(stats_layout=stats_layout,
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/engines/ie_engine.py", line 175, in _predict
    self._process_dataset_async(stats_layout=stats_layout,
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/tools/pot/engines/ie_engine.py", line 384, in _process_dataset_async
    compiled_model = self._ie.compile_model(model=self._model, device_name=self._device)
  File "/root/miniconda3/lib/python3.9/site-packages/openvino/runtime/ie_api.py", line 543, in compile_model
    super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src/inference/src/core.cpp:114:
[ GENERAL_ERROR ] Check '!device_map.empty()' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:550:
[GPU] Can't get DEVICE_ID property as no supported devices found or an error happened during devices query.
[GPU] Please check OpenVINO documentation for GPU drivers setup guide.

Issue submission checklist

ilya-lavrenov commented 5 months ago

The answer is printed out:

[GPU] Please check OpenVINO documentation for GPU drivers setup guide.

JasonSloan commented 5 months ago

The answer is printed out:

[GPU] Please check OpenVINO documentation for GPU drivers setup guide.

I have installed the GPU drivers already, but the code still went wrong!