KhronosGroup / KhronosGroup/OpenCL-Docs

Missing negative case for clCreateContext function

Open
#1,259 2 comments 0 reactions 0 assignees View on GitHub
needs-cts-coverage
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the clCreateContext specification and the devices argument description, then review the linked test_context branch for the proposed negative case. Done means the specification separately states the cross-platform-device error and clarifies that devices must belong to one platform; verify the wording against the existing API tests.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.