AnsweredAssumed Answered

Failure to allocate buffer bigger than 2 GB on Windows 10

Question asked by joern.sierwald on Apr 19, 2015
Latest reply on Jun 2, 2015 by coordz

I have a R9 290X with 8GB and I'm using Windows 10 Build 10041. I have installed no extra software, SDKs or drivers on this test computer.

 

The device claims to support allocations in one chunk of close to 4 GB, as printed out by clinfo:

  Address bits:                              64
  Max memory allocation:                     4244635648

However, I cannot allocate more than 2GB. I'm trying something simple such as:

 

   eig_opencl_handle* handle = eig_opencl_init();

   cl_mem mem_grid;

   size_t grid_npoints = 520 * 1024 * 1024;

   cl_int opencl_error;

   float* volume;

   volume = (float*) calloc(grid_npoints, sizeof(float));

   OPENCL_CHECK_ALLOC(mem_grid, handle, CL_MEM_READ_WRITE, sizeof(float)*grid_npoints); // that's an clCreateBuffer

   OPENCL_CHECK(clEnqueueWriteBuffer(handle->command_queue[0], mem_grid, CL_TRUE, 0, sizeof(float)*grid_npoints, volume, 0, NULL, NULL));

 

I get an CL_MEM_OBJECT_ALLOCATION_FAILURE.

 

Is there something I should enable to be able to allocate large memory objects? This is an 64 bit application. I can query the maximum alloc and get the same value as clinfo.

 

Some more info:

  Platform ID:                               00007FFDB202AD30
  Name:                                      Hawaii
  Vendor:                                    Advanced Micro Devices, Inc.
  Device OpenCL C version:                   OpenCL C 2.0
  Driver version:                            1756.4 (VM)
  Profile:                                   FULL_PROFILE
  Version:                                   OpenCL 2.0 AMD-APP (1756.4)

Best Regards, Jörn

Outcomes