Skip to content

Add tests for cloned kernel via clCloneKernel#2577

Merged
neiltrevett merged 5 commits into
KhronosGroup:mainfrom
MichaelRizkalla-arm:add_cloned_kernel_tests
Jun 2, 2026
Merged

Add tests for cloned kernel via clCloneKernel#2577
neiltrevett merged 5 commits into
KhronosGroup:mainfrom
MichaelRizkalla-arm:add_cloned_kernel_tests

Conversation

@MichaelRizkalla-arm
Copy link
Copy Markdown
Contributor

No description provided.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 12, 2025

CLA assistant check
All committers have signed the CLA.

Comment thread test_conformance/api/test_clone_kernel.cpp
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp
@MichaelRizkalla-arm
Copy link
Copy Markdown
Contributor Author

Thanks for the review, I've addressed the comments.

I've also incorporated the changes from #1251 as this PR is intended to continue that work.

EwanC
EwanC previously approved these changes Nov 14, 2025
Copy link
Copy Markdown
Contributor

@EwanC EwanC left a comment

Choose a reason for hiding this comment

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

I haven't had a chance to run this code, but LGTM with some minor comments

Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
Comment thread test_conformance/api/test_clone_kernel.cpp
Comment thread test_conformance/api/test_clone_kernel.cpp Outdated
@bashbaug
Copy link
Copy Markdown
Contributor

Removing "focused review" until the comments above are addressed.

MichaelRizkalla-arm and others added 5 commits December 11, 2025 14:31
Use `clSetKernelArg` to set args after kernel is cloned. Enqueue and
read the buffer to validate.
The test uses `buf_write_kernel` kernel program with 2 arguments.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Co-authored-by: Vikas Katariya <vikas.katariya@arm.com>
Co-authored-by: Ahmed Hesham <ahmed.hesham@arm.com>
Add equality operators to `clSVMWrapper` to compare with `clSVMWrapper`
object or a `nullptr`.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Use `clSetKernelExecInfo` after kernel is cloned and read the buffer
to validate.

The test uses the `set_kernel_exec_info_kernel` kernel program
with 2 arguments.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Co-authored-by: Vikas Katariya <vikas.katariya@arm.com>
Co-authored-by: Ahmed Hesham <ahmed.hesham@arm.com>
Clone a kernel with no args and enqueue.
The test uses `test_kernel_empty` kernel program with no arguments.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Co-authored-by: Vikas Katariya <vikas.katariya@arm.com>
Co-authored-by: Ahmed Hesham <ahmed.hesham@arm.com>
Use `clSetKernelArgSVMPointer` to set args after kernel is cloned.
Enqueue and read the buffer to validate.
The test uses `buf_write_kernel` kernel program with 2 arguments.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Co-authored-by: Vikas Katariya <vikas.katariya@arm.com>
Co-authored-by: Ahmed Hesham <ahmed.hesham@arm.com>
@bashbaug
Copy link
Copy Markdown
Contributor

Latest version LGTM - thanks! @lakshmih is this one you'd like to review?

@bashbaug
Copy link
Copy Markdown
Contributor

Discussed in the May 26th teleconference. OK to merge offline with one additional review (@lakshmih).

@neiltrevett neiltrevett merged commit 1bf1529 into KhronosGroup:main Jun 2, 2026
17 of 22 checks passed
@rjodinchr
Copy link
Copy Markdown
Collaborator

This commit broke some tests when running with clvk which is an OpenCL3.0 implementation with a OpenCL-C1.2 compiler.
Here is the fix for it: #2712
Please take a look, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants