Crash when mixing Intel OpenCL 1.2 SDK and a GeForce 680 OpenCL 1.1 device. #105

Closed
Eoinocal opened this Issue May 6, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@Eoinocal

Eoinocal commented May 6, 2014

When building and linking against Intel's OpenCL SDK on a Haswell i7, which supports OpenCL 1.2, the Hello World and other samples crash while enumerating a GeForce 680 device.

The crash seems to occur at device.hpp, line 65 when the version 1.2 function clRetain is called which isn't supported by the Nvidia drivers.

In hindsight it is unsurprising this happens, but it took me a while to figure it out. Is there a way to perform a runtime check and issue a warning if the devices present don't support the OpenCL version the application was compiled with?

@kylelutz

This comment has been minimized.

Show comment
Hide comment
@kylelutz

kylelutz May 6, 2014

Collaborator

I was just working on a fix for this last night :-). I've implemented a is_subdevice() check and only call clRetainDevice() if the device is actually a sub-device (which can only happen in OpenCL v1.2 and later). The branch is here (https://github.com/kylelutz/compute/tree/sub-device) and the commit is here (54c2ab3). It should be merged in later tonight.

Collaborator

kylelutz commented May 6, 2014

I was just working on a fix for this last night :-). I've implemented a is_subdevice() check and only call clRetainDevice() if the device is actually a sub-device (which can only happen in OpenCL v1.2 and later). The branch is here (https://github.com/kylelutz/compute/tree/sub-device) and the commit is here (54c2ab3). It should be merged in later tonight.

@kylelutz

This comment has been minimized.

Show comment
Hide comment
@kylelutz

kylelutz May 7, 2014

Collaborator

Fixed in 88b6a8b.

Collaborator

kylelutz commented May 7, 2014

Fixed in 88b6a8b.

@kylelutz kylelutz closed this May 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment