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

Add tests for cl_ext_immutable_memory_objects #2286

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MichaelRizkalla-arm
Copy link
Contributor

This change provides partial test coverage for KhronosGroup/OpenCL-Docs#1280

Adding CTS tests for:

  1. clEnqueueMapBuffer, clEnqueueMapImage.
  2. Command buffer negative tests.
  3. clSetKernelArgs negative tests.

The bulk of the tests is to make sure that the CL driver does not allow writing to a memory object that is created with CL_MEM_IMMUTABLE_EXT flag when used with the above APIs.

This change does the following:
1. Create `negative_enqueue_map_image` with tests for mapping images
   created with `CL_MEM_IMMUTABLE_EXT`
2. Update `enqueue_map_*` with more variants of `cl_mem_flags`

Signed-off-by: Michael Rizkalla <[email protected]>
This change updates `cl_khr_command_buffer` test binary to include
behaviour with `CL_MEM_IMMUTABLE_EXT` memory flag.

Added the following tests:
1. negative_copy_to_immutable_buffer
2. negative_copy_image_to_immutable_buffer
3. negative_copy_to_immutable_buffer_rect
4. negative_copy_to_immutable_image
5. negative_copy_buffer_to_immutable_image
6. negative_fill_immutable_image
7. negative_fill_immutable_buffer

Signed-off-by: Michael Rizkalla <[email protected]>
This change adds `negative_set_immutable_memory_to_writeable_kernel_arg`
to verify setting memory arguments marked with `CL_MEM_IMMUTABLE_EXT`.

Signed-off-by: Michael Rizkalla <[email protected]>
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.

2 participants