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

Out-of-order queue support not reported #422

Closed
EwanC opened this issue Apr 1, 2024 · 4 comments
Closed

Out-of-order queue support not reported #422

EwanC opened this issue Apr 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@EwanC
Copy link
Contributor

EwanC commented Apr 1, 2024

Version

git commit b7afa18

What behaviour are you expecting?

It looks like the CA_ENABLE_OUT_OF_ORDER_EXEC_MODE CMake variable which is set to ON by default enables CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE to be set on queue creation.
However, neither CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE from CL_DEVICE_QUEUE_PROPERTIES or CL_COMMAND_BUFFER_CAPABILITY_OUT_OF_ORDER_KHR from CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR are being returned from the appropriate queries to report device support. I would expect this to be the case for a conformant OpenCL implementation that supports out-of-order queues.

I'd also expect clCreateCommandQueueWithProperties & clCreateCommandQueue to return the following specific returned code when CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE is asked for but the device doesn't report support. However, the device currently accepts the queue property, which is confusing.

CL_INVALID_QUEUE_PROPERTIES if values specified in properties are valid but are not supported by the device.

What actual behaviour are you seeing?

Neither CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE from CL_DEVICE_QUEUE_PROPERTIES or CL_COMMAND_BUFFER_CAPABILITY_OUT_OF_ORDER_KHR from CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR are being returned from the appropriate device queries but CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE is accepted as a property on command-queue creation.

What steps are required to reproduce the bug?

./bin/UnitCL --opencl_info Shows CL_DEVICE_QUEUE_PROPERTIES : CL_QUEUE_PROFILING_ENABLE when the outcome of that query should have CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE in it.

Minimal test case

No response

Anything else we should know?

Should consider setting CA_ENABLE_OUT_OF_ORDER_EXEC_MODE to OFF by default until its behaviour can be conformant.

@EwanC EwanC added the bug Something isn't working label Apr 1, 2024
@hvdijk
Copy link
Collaborator

hvdijk commented Apr 1, 2024

Thanks for raising this.

Should consider setting CA_ENABLE_OUT_OF_ORDER_EXEC_MODE to OFF by default until its behaviour can be conformant.

We enable CA_ENABLE_OUT_OF_ORDER_EXEC_MODE because DPC++ has an issue with temporary queues that do not get deleted, but only on implementations that do not support out-of-order execution (where DPC++ creates temporary queues to emulate out-of-order execution). Turning off CA_ENABLE_OUT_OF_ORDER_EXEC_MODE is available as a debugging option when needed, but will break other things.

We are currently passing OpenCL CTS. Is this a conformance issue that is not covered by the CTS? If so, we may also want to raise a ticket there.

@EwanC
Copy link
Contributor Author

EwanC commented Apr 1, 2024

We are currently passing OpenCL CTS. Is this a conformance issue that is not covered by the CTS? If so, we may also want to raise a ticket there.

You're right this should be in the CTS, I've opened a PR to add this coverage KhronosGroup/OpenCL-CTS#1935

@hvdijk
Copy link
Collaborator

hvdijk commented Apr 2, 2024

Fixed by #425, thanks, and have confirmed that this passes CTS with your PR applied.

@hvdijk hvdijk closed this as completed Apr 2, 2024
@EwanC
Copy link
Contributor Author

EwanC commented Apr 3, 2024

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants