-
Notifications
You must be signed in to change notification settings - Fork 221
Add tests for cloned kernel via clCloneKernel #2577
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
base: main
Are you sure you want to change the base?
Add tests for cloned kernel via clCloneKernel #2577
Conversation
0a4f73d to
fd39b71
Compare
fd39b71 to
40b2e4b
Compare
|
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. |
40b2e4b to
72fb5b9
Compare
EwanC
left a comment
There was a problem hiding this 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
| return TEST_PASS; | ||
| } | ||
|
|
||
| template <size_t N> struct SVMCleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we used the clSVMWrapper class more aggressively, could we get rid of SVMCleanup?
If clSVMWrapper is too rudimentary, could we enhance it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated clSVMWrapper to cover equality, and used it instead of SVMCleanup.
|
Removing "focused review" until the comments above are addressed. |
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 <[email protected]> Co-authored-by: Vikas Katariya <[email protected]> Co-authored-by: Ahmed Hesham <[email protected]>
Add equality operators to `clSVMWrapper` to compare with `clSVMWrapper` object or a `nullptr`. Signed-off-by: Michael Rizkalla <[email protected]>
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 <[email protected]> Co-authored-by: Vikas Katariya <[email protected]> Co-authored-by: Ahmed Hesham <[email protected]>
Clone a kernel with no args and enqueue. The test uses `test_kernel_empty` kernel program with no arguments. Signed-off-by: Michael Rizkalla <[email protected]> Co-authored-by: Vikas Katariya <[email protected]> Co-authored-by: Ahmed Hesham <[email protected]>
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 <[email protected]> Co-authored-by: Vikas Katariya <[email protected]> Co-authored-by: Ahmed Hesham <[email protected]>
72fb5b9 to
4d9ca3a
Compare
No description provided.