KhronosGroup / KhronosGroup/OpenCL-Docs

Are duplicate properties allowed for clCreateCommandQueueWithProperties?

Open
#426 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

See: https://github.com/KhronosGroup/OpenCL-CTS/pull/925#discussion_r479920338

`clCreateContext`, `clCreateSamplerWithProperties`, `clCreateBufferWithProperties`, and `clCreateImageWithProperties` explicitly disallow passing the same property more than once, but `clCreateCommandQueueWithProperties` doesn't say anything about this. Should it?

`clCreatePipe` goes a bit further and says that properties must be NULL, so it doesn't say anything about duplicate properties either.

For reference, the relevant error code for `clCreateCommandQueueWithProperties` is:

> `CL_INVALID_VALUE` if values specified in properties are not valid.

Additionally:

> `CL_INVALID_QUEUE_PROPERTIES` if values specified in _properties_ are valid but are not supported by the device.

I think the former describes the properties themselves, whereas the latter describes the specific property values... or maybe even the specific `CL_QUEUE_PROPERTIES` value?

For `clCreateSamplerWithProperties` it is (**emphasis** mine):

> `CL_INVALID_VALUE` if the property name in _sampler_properties_ is not a supported property name, if the value specified for a supported property name is not valid, or **if the same property name is specified more than once**.

Contributor guide

Open the contributing guide

Research direction

Start with issue #426 and compare the documented property rules and error conditions for clCreateCommandQueueWithProperties, clCreateContext, clCreateSamplerWithProperties, clCreateBufferWithProperties, clCreateImageWithProperties, and clCreatePipe. Review the linked OpenCL-CTS discussion, resolve whether duplicate properties are invalid and how the error codes apply, then update the relevant OpenCL documentation once the behavior is decided.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.