KhronosGroup / KhronosGroup/OpenCL-Docs

Clarify requirements and error conditions for clSetDefaultDeviceCommandQueue regarding device queues

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

Description

The current specification of [clSetDefaultDeviceCommandQueue](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clSetDefaultDeviceCommandQueue) lacks clarity regarding the required type of the command queue and the reason for error codes in certain cases. Related [CTS issue](https://github.com/KhronosGroup/OpenCL-CTS/issues/2566).

The spec currently states:

> command_queue specifies a command-queue object which replaces the default device command-queue

It does not explicitly mention that command_queue must be created with the `CL_QUEUE_ON_DEVICE` property.

Moreover, for the error enums:

> CL_INVALID_OPERATION if device does not support a replaceable default on-device queue.
> CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue for device.

The specification does not clearly indicate that these errors can occur when `command_queue` is not a device queue (i.e., it is not created with `CL_QUEUE_ON_DEVICE`), even if it is otherwise a valid host queue.

Contributor guide

Open the contributing guide

Research direction

Read the clSetDefaultDeviceCommandQueue section in the linked OpenCL 3.0 unified API specification, then compare the related CTS issue #2566. Clarify the required command-queue type and the conditions for CL_INVALID_OPERATION and CL_INVALID_COMMAND_QUEUE; the specification text should explicitly cover non-device queues when done.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.