Commit Graph

2 Commits

Author SHA1 Message Date
Ben Ashbaugh
089e02cdf7 add system SVM testing via clSVMAllocWithProperties (#2516)
This PR adds system SVM testing both using driver APIs
(`clSVMAllocWithPropertiesKHR`) and the system allocator directly (e.g.
`malloc`). This is done by finding all of the SVM capabilities that are
"system allocated" and duplicating them with a special "use system
allocator" pseudo-capability. When the "use system allocator"
pseudo-capability is not present, the system SVM type is treated the
same as all other unified SVM types and is tested using driver APIs.
When the "use system allocator" pseudo-capability is present, the system
SVM type is allocated using the system allocator directly, though this
also adds some limitations, for example the properties of the allocation
may not be queried using `clGetSVMPointerInfoKHR`.

See discussion in:
https://github.com/KhronosGroup/OpenCL-Docs/issues/1446
2025-10-14 10:07:32 -07:00
Ben Ashbaugh
1da0f4f8d7 add initial unified SVM capability tests (#2210)
These tests are passing on many devices using the unified SVM emulation
layer.

Specifically, adds tests for:

* CL_SVM_CAPABILITY_SINGLE_ADDRESS_SPACE_KHR
* CL_SVM_CAPABILITY_DEVICE_UNASSOCIATED_KHR
* CL_SVM_CAPABILITY_HOST_READ_KHR
* CL_SVM_CAPABILITY_HOST_WRITE_KHR
* CL_SVM_CAPABILITY_HOST_MAP_KHR
* CL_SVM_CAPABILITY_DEVICE_READ_KHR
* CL_SVM_CAPABILITY_DEVICE_WRITE_KHR
* CL_SVM_CAPABILITY_DEVICE_ATOMIC_ACCESS_KHR
* CL_SVM_CAPABILITY_INDIRECT_ACCESS_KHR

Still TODO:

* CL_SVM_CAPABILITY_SYSTEM_ALLOCATED_KHR
* CL_SVM_CAPABILITY_DEVICE_OWNED_KHR
* CL_SVM_CAPABILITY_CONTEXT_ACCESS_KHR
* CL_SVM_CAPABILITY_HOST_OWNED_KHR
* CL_SVM_CAPABILITY_CONCURRENT_ACCESS_KHR
* CL_SVM_CAPABILITY_CONCURRENT_ATOMIC_ACCESS_KHR
2025-02-11 11:42:32 -08:00