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

update the GPU searching function in multi GPUs #2021

Merged
merged 3 commits into from
May 17, 2024

Conversation

openvino-book
Copy link
Contributor

The original code works well in single GPU mode, and will work wrong in Multi GPUs mode, so I update the code from

if "GPU" not in core.available_devices:

to

if any('GPU' in device for device in core.available_devices) == False:

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -87,7 +87,7 @@
"\n",
"core = ov.Core()\n",
"\n",
"if \"GPU\" not in core.available_devices:\n",
"if any('GPU' in device for device in core.available_devices) == False:\n",
Copy link
Collaborator

@eaidova eaidova May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to fix code style:

Suggested change
"if any('GPU' in device for device in core.available_devices) == False:\n",
"if not any('GPU' in device for device in core.available_devices):\n",

@eaidova eaidova merged commit 33e5fef into openvinotoolkit:latest May 17, 2024
13 of 15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants