Dependencies
This extension is written against the OpenCL Specification Version 3.0.1-Provisional.
This extension requires OpenCL 1.2 or later.
This extension interacts with the cl_intel_unified_shared_memory
extension.
Overview
This extension allows an application to override driver heuristics to force allocation of a buffer memory object in host memory.
Host memory is described in the cl_intel_unified_shared_memory
extension.
Allocating a buffer memory object in host memory trades off wide accessibility and transfer benefits for higher per-access costs. Buffer memory objects in host memory may also be subject to additional usage restrictions.
New API Enums
Flag of type cl_mem_flags, used when creating a buffer object to force allocation of a buffer memory object in host memory:
#define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20)
Modifications to the OpenCL API Specification
- (Add to Table 12 - List of supported memory flag values)
-
Table 12.List of supported memory flag values Memory Flags Description CL_MEM_FORCE_HOST_MEMORY_INTEL
This flag specifies that the memory object must be placed in host memory.
Memory objects in host memory may be subject to additional usage restrictions. These restrictions may be queried using the
CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL
query added by thecl_intel_unified_shared_memory
extension.When using this flag together with
CL_MEM_USE_HOST_PTR
, the host_ptr and size parameters must be aligned to theCL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
value. - (Add to the list of error codes for clCreateBuffer and clCreateBufferWithProperties)
-
-
CL_INVALID_HOST_PTR
if flags includesCL_MEM_USE_HOST_PTR
andCL_MEM_FORCE_HOST_MEMORY_INTEL
and host_ptr is not aligned to the largestCL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
value for all devices in context. -
CL_INVALID_BUFFER_SIZE
if flags includesCL_MEM_USE_HOST_PTR
andCL_MEM_FORCE_HOST_MEMORY_INTEL
and size is not a multiple of the largestCL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
value for all devices in context.
-
- (Add to the list of error codes for clCreateSubBuffer)
-
-
CL_INVALID_VALUE
if flags specifiesCL_MEM_FORCE_HOST_MEMORY_INTEL
.
-
Interactions with Other Extensions
This extension interacts with cl_intel_unified_shared_memory
.
Memory objects that are allocated in host memory using CL_MEM_FORCE_HOST_MEMORY_INTEL
may be subject to additional usage restrictions.
These restrictions may be queried using the CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL
query added by the cl_intel_unified_shared_memory
extension.