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

Missing negative case for clCreateContext function #1259

Open
shajder opened this issue Sep 13, 2024 · 2 comments
Open

Missing negative case for clCreateContext function #1259

shajder opened this issue Sep 13, 2024 · 2 comments
Labels
needs-cts-coverage The CTS needs to be extended

Comments

@shajder
Copy link

shajder commented Sep 13, 2024

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

@SunSerega
Copy link
Contributor

I also saw this behavior, but in my case, I have a proper Nvidia driver + Intel OpenCL driver on an AMD CPU.

If I make Intel driver primary (place CPU device from their platform first in the list) - I get CL_INVALID_DEVICE as expected.

But if I make NVidia driver primary - my .Net app crashes with System.AccessViolationException.

@bashbaug
Copy link
Contributor

Sounds like we might want a CTS test for this in addition to a spec clarification.

@bashbaug bashbaug added the needs-cts-coverage The CTS needs to be extended label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cts-coverage The CTS needs to be extended
Projects
Development

No branches or pull requests

3 participants