Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope of invalid object detection #1275

Open
nikhiljnv opened this issue Oct 22, 2024 · 1 comment
Open

Scope of invalid object detection #1275

nikhiljnv opened this issue Oct 22, 2024 · 1 comment

Comments

@nikhiljnv
Copy link
Contributor

nikhiljnv commented Oct 22, 2024

The spec says https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#cl_khr_external_semaphore
clEnqueueWaitSemaphoresKHR returns one of the following errors:

CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.

There was a test added (seems like it is not there after recent changes). But, see line number 75 through 114 for test WaitInvalidCommandQueue here
KhronosGroup/OpenCL-CTS@340b7c9#diff-9db37a7bea13efb24c41e17c056e5b880f171f6cc4b140b76bdd449de26bb495R114

The test tried to pass a command queue from a different device of a different platform to test invalid command queue scenario.
Not sure if this was discussed somewhere already, but that brings up a question on what is the scope of invalid pointers the implementations are expected to detect the validity of the command-queue (may be applicable to other scenarios for other OpenCL objects too) in order to return the expected error.

@bashbaug
Copy link
Contributor

See related discussion in #482, especially #482 (comment).

The discussion in the issue led to the "valid object" definition in the OpenCL spec:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#valid-object-definition

In short: the only invalid command-queue we should be testing for is a NULL command-queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs WG discussion
Development

No branches or pull requests

2 participants