KhronosGroup / KhronosGroup/OpenCL-Docs

Clarify what devices are selected by `clCreateContextFromType`

Open
#1,392 0 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

Currently specified as follows

>To create an OpenCL context from a specific device type, call clCreateContextFromType
>Only devices that are returned by clGetDeviceIDs for device_type are used to create the context. The context does not reference any sub-devices that may have been created from these devices.

A few things to consider (from discussion in 2025/06/17 teleconference)
- What is the behaviour when passing `CL_DEVICE_TYPE_ALL`
- Should the description refer to "all devices that are returned" instead of "only devices that are returned"
- Some reported that the conformance tests did not match the specification. We should make sure they are aligned.
- Anything else?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the current clCreateContextFromType description and the related clGetDeviceIDs behavior. Check how CL_DEVICE_TYPE_ALL and sub-devices are described, then compare the specification with the conformance tests. Done means the device-selection wording and tests agree.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.