intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
507 stars 55 forks source link

Failed at model compiling on mobile dGPU (nVidia) #105

Closed tito2-lab closed 7 months ago

tito2-lab commented 7 months ago

Hi,

my mobile system has nVidia dGPU (NVIDIA GeForce RTX 4060 Laptop) and filed on the device at compile process. It may better to use iGPU when dGPU is nVidia or have option to select GPU to use. Please consider some modification for improving on such system.

I changed script to use iGPU as below then it works gimpopenvino/tools/stable-diffusion-ov-server.py line 132

    if device_name ==  "dGPU":
        device =  ["CPU","GPU.0","GPU.0"]
        device_int8 = ["CPU","GPU.0","GPU.0","GPU.0"]  
        #device =  ["CPU","GPU.1","GPU.1"]
        #device_int8 = ["CPU","GPU.1","GPU.1","GPU.1"]  

my environment:

・Windows11 Pro 10.0.22631 build 22631
・intel core ultra 9 185H
・System memory 32G
・iGPU: intel Arc Graphics
・dGPU: NVIDIA GeForce RTX 4060 Laptop

Error message:

Traceback (most recent call last):
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python39\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python39\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Public\GIMP\gimpenv3\Lib\site-packages\gimpopenvino\tools\stable-diffusion-ov-server.py", line 144, in run
    engine = StableDiffusionEngineAdvanced(
  File "C:\Users\Public\GIMP\gimpenv3\Lib\site-packages\gimpopenvino\tools\openvino_common\models_ov\stable_diffusion_engine.py", line 157, in __init__
    self.vae_decoder = self.core.compile_model(os.path.join(model, "vae_decoder.xml"), device[3])
  File "C:\Users\Public\openvino\python\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:133:
[ GENERAL_ERROR ] Check 'false' failed at src\plugins\intel_gpu\src\plugin\program_builder.cpp:176:
[GPU] ProgramBuilder build failed!
Exception from src\plugins\intel_gpu\src\graph\include\primitive_type_base.h:58:
[GPU] Can't choose implementation for convert:Constant_19708 node (type=reorder)
[GPU] Original name: Constant_19708
[GPU] Original type: Convert
[GPU] Reason: Check '!kernels.empty()' failed at src\plugins\intel_gpu\src\kernel_selector\kernel_selector.cpp:70:
[GPU] Couldn't find a suitable kernel for convert:Constant_19708 params raw string: F16_BFYX_v1_p0_0_v1_p0_0_v512_p0_0_v512_p0_0;F32_BFYX_v1_p0_0_v1_p0_0_v512_p0_0_v512_p0_0
arisha07 commented 7 months ago

Hi there, did you use the latest commit ? As we are now handling this time of situation at complete_install level itself and you should not see this error as "GPU.1" won't even get populated in supported_device and you should not hit the "dGPU" scenario.

https://github.com/intel/openvino-ai-plugins-gimp/blob/main/gimpopenvino/tools/complete_install.py#L38

tito2-lab commented 7 months ago

Thank you for sharing info, confirmed it works.