-
Notifications
You must be signed in to change notification settings - Fork 221
Add cl_ext_immutable_memory_objects tests writing to and from buffer
#2432
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?
Conversation
bashbaug
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 don't have access to a system to test these changes, but here are a few things I noticed reading through the code.
test_conformance/buffers/testBase.h
Outdated
| extern const cl_mem_flags immutable_flag_set[]; | ||
| extern const char* immutable_flag_set_names[]; | ||
| #define NUM_IMMUTABLE_FLAGS 3 |
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 find this confusing.
- Why is
NUM_FLAGSequal to 5 when there are 8 entries in the array? - Why are there separate arrays for immutable flags that are used sometimes, but not every time?
Could we have a single array instead and filter based on the flags we care about testing?
Alternatively, could we have two distinct arrays, and iterate over both if we want to test both mutable and immutable flags?
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 followed the first option; a single array with all available flags to test. Updated buffer test suite existing tests to skip to new flags whenever needed.
f37293a to
6d388d7
Compare
The change tests: 1. Writing to immutable buffers. 2. Writing to buffer/image from immutable buffers. 3. Reading from immutable buffers. This change adds the following tests: 1. `test_negative_imagearraycopy` 2. `test_negative_imagearraycopy3d` 3. `test_immutable_bufferreadwriterect` 4. `test_immutable_arrayreadwrite` 5. `test_write_from_immutable_buffer_to_buffer` 6. `test_immutable_buffer_map_*` and extends the following tests: 1. `test_arrayimagecopy3d` 2. `test_arrayimagecopy` 3. `test_imagearraycopy3d` 4. `test_imagearraycopy` 5. `test_buffer_copy` 6. `test_buffer_partial_copy` Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
6d388d7 to
5377c00
Compare
This change extends the test coverage for KhronosGroup/OpenCL-Docs#1280
The change tests:
This change adds the following tests:
test_negative_imagearraycopytest_negative_imagearraycopy3dtest_immutable_bufferreadwriterecttest_immutable_arrayreadwritetest_write_from_immutable_buffer_to_buffertest_immutable_buffer_map_*and extends the following tests:
test_arrayimagecopy3dtest_arrayimagecopytest_imagearraycopy3dtest_imagearraycopytest_buffer_copytest_buffer_partial_copy