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

[EXP][Command-buffer] OpenCL kernel command update #7

Closed
wants to merge 2 commits into from

Conversation

EwanC
Copy link
Collaborator

@EwanC EwanC commented Feb 14, 2024

Implement the API for updating the kernel commands in a command-buffer defined by oneapi-src#1089 for the OpenCL adapter.

This depends on support for the cl_khr_command_buffer_mutable_dispatch extension.

Tested on Intel GPU OpenCL implementations with the command-buffer emulation layer.

$ OPENCL_LAYERS=<path/to/SimpleOpenCLSamples/build/layers/10_cmdbufemu/libCmdBufEmu.so> ./bin/test-exp_command_buffer --platform="Intel(R) OpenCL Graphics"

DPC++ PR intel/llvm#12724

Copy link

@mfrancepillois mfrancepillois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about the OpenCL backend to review this PR correctly, but overall looks good to me.

CL_RETURN_ON_FAILURE(
deviceSupportsURCommandBufferKernelUpdate(CLDevice, SupportsUpdate));

const bool Updatable = IsUpdatable && SupportsUpdate;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we return a warning or something if IsUpdatable==true and SupportUpdate==false?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! We should return an error, which should also be defined by the spec. Added that now.

Implement the API for updating the kernel commands in a command-buffer
defined by oneapi-src#1089 for
the OpenCL adapter.

This depends on support for the
[cl_khr_command_buffer_mutable_dispatch](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer_mutable_dispatch)
extension.

Tested on Intel GPU OpenCL implementations with the
[command-buffer emulation
layer](https://github.com/bashbaug/SimpleOpenCLSamples/tree/main/layers/10_cmdbufemu).

```bash
$ OPENCL_LAYERS=<path/to/SimpleOpenCLSamples/build/layers/10_cmdbufemu/libCmdBufEmu.so> ./bin/test-exp_command_buffer --platform="Intel(R) OpenCL Graphics"
```
@EwanC EwanC force-pushed the ewan/mutable_dispatch_update branch 2 times, most recently from 34978e0 to a30dc3b Compare February 15, 2024 18:14
@EwanC EwanC force-pushed the ewan/mutable_dispatch_update branch from a30dc3b to 67da5d8 Compare February 15, 2024 18:32
@EwanC
Copy link
Collaborator Author

EwanC commented Feb 19, 2024

Moved to an upstream PR oneapi-src#1358

@EwanC EwanC closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants