Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide

ID 683846
Date 10/04/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

6.2.4. Enabling All Global Memory

By default, the OpenCL runtime reserves a small portion of the memory at the start of the device's memory to facilitate NULL-pointer checking. This ensures that valid global memory pointers always have a non-zero value and allows a zero value to be interpreted as a NULL pointer.
To enable 100% of the device's memory to be used, including the reserved memory, set the CL_ALLOW_GLOBAL_MEM_AT_NULL_ADDRESS_INTELFPGA environment variable to 1.
Note: If the CL_ALLOW_GLOBAL_MEM_AT_NULL_ADDRESS_INTELFPGA environment variable is set to 1, a valid global memory pointer can be 0 when observed by the kernel. In other words, you cannot reliably check inside the kernel that a NULL global memory pointer is invalid.