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
ca082ed48e add initial unified SVM API tests (#2261)
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.
2025-02-11 11:59:11 -08:00