← Back to Pull requests

Fix error code checked in command-buffer negative_enqueue_inconsistent_device #2875

Closed
unknown closed this pull request without merging on Nov 17, 2026 16:52 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 07:31 UTC
Author

The command-buffer negative_enqueue_inconsistent_device test is a negative test that the CL_INVALID_DEVICE error code is returned as defined by the clEnqueueCommandBufferKHR entry point spec wording.

However, there is a typo in this test and it is checking for the CL_INCOMPATIBLE_COMMAND_QUEUE_KHR error code rather than CL_INVALID_DEVICE. This was found by bug report https://github.com/KhronosGroup/OpenCL-CTS/issues/2872 and has probably been hidden until now as to run the test a platform with more than 1 device is needed, which is a less common setup.

As pointed in the the PR feedback there were other underlying issues with the test, primarily that the harness always created single device contexts so the test will always be skipped. Addressed by using the GetOpposingDevice helper to find an alternative device, then the tests own context, queues, and command-buffer with it.

Additionally I've installed rusticl locally so I can get access to a platform with more than one device, and ran the test against the emulation layer which supports command-buffers v1.0. In this setup the test passes, so hopefully this gives us enough confidence in the fix

    $ OPENCL_LAYERS=$HOME/SimpleOpenCLSamples/build/layers/10_cmdbufemu/libCmdBufEmu.so RUSTICL_ENABLE=llvmpipe,iris    ./test_conformance/extensions/cl_khr_command_buffer/test_cl_khr_command_buffer negative_enqueue_inconsistent_device pid3
    
      Initializing random seed to 0.
    Requesting Default device based on command line for platform index 3 and device index 0
    Compute Device Name = Mesa Intel(R) Arc(tm) Graphics (MTL), Compute Device Vendor = Intel, Compute Device Version = OpenCL 3.0 , CL C Version = OpenCL C 1.2
    Device latest conformance version passed: v0000-01-01-00
    Supports single precision denormals: NO
    sizeof( void*) = 8  (host)
    sizeof( void*) = 8  (device)
    negative_enqueue_inconsistent_device...
    negative_enqueue_inconsistent_device passed
    PASSED test.
  

Closes https://github.com/KhronosGroup/OpenCL-CTS/issues/2872

Diff: 273 lines (+204 / -69) across 3 files Reviewer: joselopeqti Review duration: 12080m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 273 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.336
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2875"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.5% (MEDIUM) · Higher = larger blast radius
39.5%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.6% · Safe to merge
15.6%