OpenCL-Docs icon indicating copy to clipboard operation
OpenCL-Docs copied to clipboard

Missing negative case for clCreateContext function

Open shajder opened this issue 5 months ago • 2 comments

Attempt to create context with multiple devices associated with different platforms should have separate negative case, something like:

CL_INVALID_DEVICE if the platform associated with devices in devices list is not the same.

Additional remarks:

  1. Creating multi-device-platform context is impossible. I think spec could do more about explaining such a case. Description from the devices argument could be extended, currently it says:

devices is a pointer to a list of unique devices returned by clGetDeviceIDs or sub-devices created by clCreateSubDevices for a platform.

2)  At my machine attempt to create context with two devices from nvidia and intel platform crashes. I could only presume this is not an isolated case. Here is my branch to test such case with test_context:

https://github.com/shajder/OpenCL-CTS/tree/context_negative_create

shajder avatar Sep 13 '24 06:09 shajder