Sample demonstrating how to query OpenCL device capabilities related to Unified Shared Memory.
To check if your device supports Unified Shared Memory you should verify if cl_intel_unified_shared_memory
extension string is present in CL_DEVICE_EXTENSIONS
.
Unified Shared Memory specification defines five different allocation types that you can use:
Host
;Device
;Shared
;Shared (Cross-Device)
;Shared System (Cross-Device)
;
Device can allow different set of operations for each allocation type, so you should check supported USM capabilities:
MEMORY_ACCESS
;MEMORY_ATOMIC_ACCESS
;MEMORY_CONCURRENT_ACCESS
;MEMORY_CONCURRENT_ATOMIC_ACCESS
;
usm_queries