Name Strings

cl_intel_mem_force_host_memory

Contact

Michał Mrozek, Intel (michal 'dot' mrozek 'at' intel 'dot' com)

Contributors

Michał Mrozek, Intel
Ben Ashbaugh, Intel
Filip Hazubski, Intel

Notice

Copyright (c) 2020-2023 Intel Corporation. All rights reserved.

Status

Final Draft

Version

Last Modified

2020-09-17

Version

1.0.0

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 Functions

None.

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)

New API Types

None.

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 the cl_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 the CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE value.

(Add to the list of error codes for clCreateBuffer and clCreateBufferWithProperties)
  • CL_INVALID_HOST_PTR if flags includes CL_MEM_USE_HOST_PTR and CL_MEM_FORCE_HOST_MEMORY_INTEL and host_ptr is not aligned to the largest CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE value for all devices in context.

  • CL_INVALID_BUFFER_SIZE if flags includes CL_MEM_USE_HOST_PTR and CL_MEM_FORCE_HOST_MEMORY_INTEL and size is not a multiple of the largest CL_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 specifies CL_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.

Issues

None.

Revision History

Version Date Author Changes

1.0.0

2020-09-17

Ben Ashbaugh

First public revision