cl_khr_command_buffer: negative_enqueue_inconsistent_device expects CL_INCOMPATIBLE_COMMAND_QUEUE_KHR instead of CL_INVALID_DEVICE

Open Beginner friendly
#2,872 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@kpet is already working on this.

Since Nov 5, 2026.

  • #2875 by @EwanC — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
testing

Research direction

Open test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_enqueue.cpp around lines 454–471 and compare the expected error with the quoted clEnqueueCommandBufferKHR specification rule. Update the test expectation to match the current specification, then run the focused command-buffer enqueue test and confirm the inconsistent-device case expects CL_INVALID_DEVICE.

Written by the indexing model from the issue text.

Description

negative_enqueue_inconsistent_device (EnqueueCommandBufferInconsistentDevice) expects the wrong error code.

The comment above the test quotes the spec rule:

CL_INVALID_DEVICE if any element of queues does not have the same device as the command-queue set on command_buffer creation at the same list index.

but the test checks for CL_INCOMPATIBLE_COMMAND_QUEUE_KHR:

https://github.com/KhronosGroup/OpenCL-CTS/blob/b02dd576744600e055b971ca9b2e8a57b9f40d60/test_conformance/extensions/cl_khr_command_buffer/negative_command_buffer_enqueue.cpp#L454-L471

CL_INVALID_DEVICE is what the current clEnqueueCommandBufferKHR specification lists for this case. It replaced the "incompatible queue" error when queue compatibility was reworked in cl_khr_command_buffer 0.9.7 (KhronosGroup/OpenCL-Docs#1292). An implementation that follows the specification fails the test on any platform with two devices.

Found while updating PoCL's command-buffer implementation to 1.0.0.

Dominant language
C++
Stars
234
Forks
240
Avg merge
6d 12h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/OpenCL-CTS

All issues in KhronosGroup/OpenCL-CTS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.