Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BiankaBeuka opened this issue Jul 5, 2024 · 9 comments

Comments

@BiankaBeuka
Copy link

[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

Copy link
Member

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

@BiankaBeuka
Copy link
Author

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

Copy link
Member

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
Copy link
Author

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

Copy link
Member

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
Copy link
Author

Ok, it works now. Please close this issue.

Copy link
Member

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
Copy link
Author

Could you please assign this issue to me?

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants