second-state / chat-with-chatgpt

Chat with ChatGPT via GitHub issue comments.
111 stars 13 forks source link

[Bug]: Device with "gpu" name is not registered in the OpenVINO Runtime #384

Open BiankaBeuka opened 3 months ago

BiankaBeuka commented 3 months ago

[Bug]: Device with "gpu" name is not registered in the OpenVINO Runtime

Traceback (most recent call last): File "/data/scratch/mkw-anomalib/anomalib-predict.py", line 27, in inferencer = OpenVINOInferencer(path="/path/to/model.onnx", device="gpu") File "/home/sinntelligence/.local/lib/python3.10/site-packages/anomalib/deploy/inferencers/openvino_inferencer.py", line 109, in init self.input_blob, self.output_blob, self.model = self.load_model(path) File "/home/sinntelligence/.local/lib/python3.10/site-packages/anomalib/deploy/inferencers/openvino_inferencer.py", line 147, in load_model compile_model = core.compile_model(model=model, device_name=self.device, config=self.config) File "/home/sinntelligence/.local/lib/python3.10/site-packages/openvino/runtime/ie_api.py", line 521, in compile_model super().compile_model(model, device_name, {} if config is None else config), RuntimeError: Exception from src/inference/src/cpp/core.cpp:106: Exception from src/inference/src/dev/core_impl.cpp:566: Device with "gpu" name is not registered in the OpenVINO Runtime

alabulei1 commented 3 months ago

Hello, I am your assistant on GitHub, built by the Second State team. I am ready for your question now!

BiankaBeuka commented 3 months ago

Traceback (most recent call last): File "/data/scratch/mkw-anomalib/anomalib-predict.py", line 27, in inferencer = OpenVINOInferencer(path="/path/to/model.onnx", device="gpu") File "/home/sinntelligence/.local/lib/python3.10/site-packages/anomalib/deploy/inferencers/openvino_inferencer.py", line 109, in init self.input_blob, self.output_blob, self.model = self.load_model(path) File "/home/sinntelligence/.local/lib/python3.10/site-packages/anomalib/deploy/inferencers/openvino_inferencer.py", line 147, in load_model compile_model = core.compile_model(model=model, device_name=self.device, config=self.config) File "/home/sinntelligence/.local/lib/python3.10/site-packages/openvino/runtime/ie_api.py", line 521, in compile_model super().compile_model(model, device_name, {} if config is None else config), RuntimeError: Exception from src/inference/src/cpp/core.cpp:106: Exception from src/inference/src/dev/core_impl.cpp:566: Device with "gpu" name is not registered in the OpenVINO Runtime

alabulei1 commented 3 months ago

The error message indicates that the device name "gpu" is not registered in the OpenVINO Runtime. This usually happens when OpenVINO does not recognize the device name you provided for hardware acceleration.

To resolve this issue, you can try the following steps:

  1. Check OpenVINO Supported Devices: Ensure that the device name "gpu" is a supported device by OpenVINO. You can refer to the official OpenVINO documentation or release notes to confirm the supported device names for your version.

  2. Verify OpenVINO Installation: Make sure that the OpenVINO toolkit is properly installed and configured on your system. Sometimes, incorrect installation or configuration can lead to issues with device recognition.

  3. Update OpenVINO Runtime: Ensure that you are using the latest version of the OpenVINO toolkit. Newer versions may have added support for additional devices or fixed compatibility issues.

  4. Use Correct Device Name: If "gpu" is not a valid device name, try using the appropriate device name for GPU acceleration supported by OpenVINO. Common device names for GPUs include "GPU", "GPU_FP32", or specific GPU model names.

  5. Check Runtime Configuration: Verify if there are any specific runtime configurations or environment variables required for enabling GPU support in OpenVINO. You may need to set up the environment variables correctly for GPU inference.

By following these steps, you should be able to address the issue of the device name "gpu" not being registered in the OpenVINO Runtime. If you continue to experience issues, you may need to consult the OpenVINO documentation or seek assistance from the OpenVINO support community.

BiankaBeuka commented 3 months ago

import openvino as ov core = ov.Core() print(core.available_devices) inferencer = OpenVINOInferencer(path="/path/to/model.onnx", device="gpu")

I'm running this code and get the error Device with "gpu" name is not registered in the OpenVINO Runtime

alabulei1 commented 3 months ago

It seems like you are trying to use the OpenVINO Python API to set up an inference engine with the "gpu" device, but encountering an error because the device name "gpu" is not recognized by the OpenVINO Runtime.

Here are some steps you can take to resolve this issue:

  1. Check Available Devices: Use the OpenVINO Core object to print out the available devices and verify the supported device names. Update your code as follows:
import openvino as ov

core = ov.Core()
print(core.available_devices)

Review the output of print(core.available_devices) to see the list of supported devices available for inference. Use one of the supported device names in your code.

  1. Use Correct Device Name: Update your code to specify the correct device name for GPU acceleration. Common device names for GPUs in OpenVINO include "GPU", "GPU_FP32", or specific GPU model names. Modify your code as follows:
inferencer = OpenVINOInferencer(path="/path/to/model.onnx", device="GPU")

Replace "gpu" with the appropriate supported device name based on the output from print(core.available_devices).

  1. Ensure OpenVINO Installation: Double-check that the OpenVINO toolkit is properly installed and configured on your system. Make sure the necessary components for GPU support are installed.

By following these steps, you should be able to address the issue of the "gpu" device not being registered in the OpenVINO Runtime. Feel free to give it a try and let me know if you need further assistance.

BiankaBeuka commented 3 months ago

Ok, it works now. Please close this issue.

alabulei1 commented 3 months ago

I'm glad to hear that the issue has been resolved! If you have any more questions or need further assistance in the future, feel free to reach out. Have a great day! I will close this issue now.

BiankaBeuka commented 3 months ago

Could you please assign this issue to me?

alabulei1 commented 3 months ago

I'm currently unable to directly make changes to your GitHub issues. However, you can assign the issue to yourself by following these steps:

  1. Go to the issue page on GitHub.
  2. Click on the "Assignees" dropdown menu on the right-hand side.
  3. Select your GitHub username from the list to assign the issue to yourself.

If you encounter any issues or have any more questions, feel free to ask for further assistance.