Skip to content

Commit b63ef2d

Browse files
authored
add tests for unified SVM corner cases (#2436)
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.
1 parent b646ba5 commit b63ef2d

3 files changed

Lines changed: 851 additions & 5 deletions

File tree

test_conformance/SVM/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ set(${MODULE_NAME}_SOURCES
1717
test_shared_sub_buffers.cpp
1818
test_migrate.cpp
1919
test_unified_svm_consistency.cpp
20+
test_unified_svm_corner_cases.cpp
2021
test_unified_svm_capabilities.cpp
2122
test_unified_svm_apis.cpp
2223
test_unified_svm_api_query_defaults.cpp

0 commit comments

Comments
 (0)