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

[SYCL] Fix platform selection in opencl-aot #1510

Merged
merged 7 commits into from
Apr 21, 2020
Merged

[SYCL] Fix platform selection in opencl-aot #1510

merged 7 commits into from
Apr 21, 2020

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 dmitri.n.mokhov@intel.com

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 <dmitri.n.mokhov@intel.com>
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

opencl-aot/source/utils.cpp Outdated Show resolved Hide resolved
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
…nstructor.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
opencl-aot/source/utils.cpp Outdated Show resolved Hide resolved
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Signed-off-by: Mokhov, Dmitri N <dmitri.n.mokhov@intel.com>
@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.

Signed-off-by: Mokhov, Dmitri N <dmitri.n.mokhov@intel.com>
Signed-off-by: Mokhov, Dmitri N <dmitri.n.mokhov@intel.com>
@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