Here are some tests to check how SVM APIs behave when the size is zero,
see:
* https://github.com/KhronosGroup/OpenCL-Docs/issues/1403
These tests don't fail right now if some of the calls are unsuccessful.
This ensures that all sub-tests run on a given implementation.
This PR adds tests for a number of interesting unified SVM corner cases.
Not all of these may be valid tests! If we decide that some of these
tests are invalid, I will remove them.
Added tests include:
* Calling clSVMAllocWithPropertiesKHR to allocate zero bytes for each
unified SVM type.
* Calling clSVMFreeWithPropertiesKHR to free a NULL pointer.
* Calling clEnqueueSVMFree to asynchronously free an empty set of SVM
pointers.
* Calling clEnqueueSVMFree to asynchronously free a NULL pointer.
* Calling clSetKernelArgSVMPointer to set a NULL pointer kernel
argument.
* Calling clSetKernelArgSVMPointer to set a bogus pointer kernel
argument.
* Calling clSetKernelExecInfo with CL_KERNEL_EXEC_INFO_SVM_PTRS with an
empty set of SVM pointers.
* Calling clSetKernelExecInfo with CL_KERNEL_EXEC_INFO_SVM_PTRS with a
NULL pointer.
* Calling clSetKernelExecInfo with CL_KERNEL_EXEC_INFO_SVM_PTRS with a
bogus pointer.
* Calling clEnqueueSVMMemcpy with a size of zero and a NULL source or
destination pointer.
* Calling clEnqueueSVMMemcpy with a size of zero and a bogus source or
destination pointer.
* Calling clEnqueueSVMMemcpy with a size of zero and a valid source or
destination pointer.
* Calling clEnqueueSVMMemFill with a size of zero and a NULL destination
pointer.
* Calling clEnqueueSVMMemFill with a size of zero and a bogus
destination pointer.
* Calling clEnqueueSVMMemFill with a size of zero and a valid
destination pointer.
* Calling clEnqueueSVMMigrateMem with a size of zero and a NULL pointer.
* Calling clEnqueueSVMMigrateMem with a size of zero and a valid
pointer.
Note, this PR is setup to merge to the `cl_khr_unified_svm` branch.
Adds tests for getting a suggested SVM type index. This is the next item
on the `cl_khr_unified_svm` test plan.
Note, this PR is setup to merge to the `cl_khr_unified_svm` branch.
Querying a non-USVM pointer should return default values and should not
return an error. This is the next item on the `cl_khr_unified_svm` test
plan.
This PR includes tests for `clSVMAllocWithPropertiesKHR` and
`clGetSVMPointerInfoKHR` for valid pointers, as per the unified SVM test
plan. These tests are passing on many devices with the unified SVM
emulation layer.
Note, these tests use the same test fixture and unified SVM wrapper as
the unified SVM capability tests in #2210.
Adds a unified SVM consistency check test, as per the description in
#2150.
Note that the target branch for this PR is the cl_khr_unified_svm
branch, not the main branch.
Isuue #875 clarified that CL_INVALID_BUFFER_SIZE should be returned if
clCreateBuffer is passed a pointer returned by clSVMAlloc as its
host_ptr and the size of the buffer exceeds the size of the SVM
allocation.
Add a new negative test to ensure CL_INVALID_BUFFER_SIZE is returned
when the size of buffer exceeds the size of the SVM allocation.
Fixes#1701
Only disable `-Wsign-compare` for tests that do not compile cleanly
with this warning enabled. Re-enable the warning for the other tests,
so that it can catch any new occurrences.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Fix an instance of this warning in mem_host_flags.
Only disable `-Wsometimes-uninitialized` for the SVM test, which does
not compile cleanly with this warning enabled. Re-enable the warning
for the other tests, so that it can catch any new occurrences.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
`CMAKE_CXX_STANDARD` is already set in the top-level CMakeLists.txt
file, so there is no need to have it repeated for individual modules.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The maintenance of the conformance tests is moving to Github.
This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.
Signed-off-by: Kevin Petit kevin.petit@arm.com