Skip to content

Conversation

@dnmokhov
Copy link
Contributor

Before picking a matched platform name, ensure the device type also
matches. This fixes a mismatch issue that was caused by an identical
supported platform name for CPU and GPU.

Only iterate through available platforms. When the error message is
non-empty, always return CLErr, so that the message is shown.

Signed-off-by: Dmitri Mokhov [email protected]

Before picking a matched platform name, ensure the device type also
matches. This fixes a mismatch issue that was caused by an identical
supported platform name for CPU and GPU.

Only iterate through available platforms. When the error message is
non-empty, always return CLErr, so that the message is shown.

Signed-off-by: Dmitri Mokhov <[email protected]>
dm-vodopyanov
dm-vodopyanov previously approved these changes Apr 13, 2020
Copy link
Contributor

@romanovvlad romanovvlad left a comment

Choose a reason for hiding this comment

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

LGMT

@dnmokhov dnmokhov requested a review from dm-vodopyanov April 16, 2020 22:00
dm-vodopyanov
dm-vodopyanov previously approved these changes Apr 17, 2020
Copy link
Contributor

@dm-vodopyanov dm-vodopyanov left a comment

Choose a reason for hiding this comment

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

As a suggestion for clear UX, ErrorMessage from getOpenCLDevice(Platform, Type) should be extended with something like Failed to find OpenCL ### device in these OpenCL platforms: ***, where ### could be CPU, ..., etc, and *** is the content of DeviceTypesToSupportedPlatformNames[Type] vector.

@dnmokhov dnmokhov requested a review from dm-vodopyanov April 17, 2020 23:09
@bader bader merged commit bc01115 into intel:sycl Apr 21, 2020
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.

5 participants