Correct the logic to return device count.#623
Merged
oleksandr-pavlyk merged 4 commits intoIntelPython:masterfrom Oct 10, 2021
Merged
Correct the logic to return device count.#623oleksandr-pavlyk merged 4 commits intoIntelPython:masterfrom
oleksandr-pavlyk merged 4 commits intoIntelPython:masterfrom
Conversation
Contributor
Author
|
@oleksandr-pavlyk I found what the issue was. The existing logic returned zero for a device type if no backend was specified. I fixed that. However, we need some good way of testing it n both C API and Python.
|
6066c64 to
ad6eabf
Compare
Collaborator
b63e01e to
67c4993
Compare
oleksandr-pavlyk
previously approved these changes
Oct 7, 2021
Contributor
|
Is the PR ready to graduate out of draft status? |
Contributor
Author
Need to add C API tests. Will do it later today. |
We were not handling the cases where a device identifier does not provide a backend or a device type. Changed the logic to count all devices of a given type if no backend is specified. Similarly, all devices in a backend are counted if no device type is provided.
67c4993 to
83a2b2f
Compare
added 3 commits
October 8, 2021 14:46
83a2b2f to
32a2425
Compare
oleksandr-pavlyk
approved these changes
Oct 9, 2021
Contributor
oleksandr-pavlyk
left a comment
There was a problem hiding this comment.
Looks good to me, and CI agrees :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were not handling the cases where a device identifier
does not provide a backend or a device type. Changed the logic
to count all devices of a given type if no backend is specified.
Similarly, all devices in a backend are counted if no device
type is provided.
Fixes #601