8 Replies Latest reply on Aug 21, 2015 2:04 AM by dipak

    OpenCL memory buffer and image less than 64 Mb not releasing?

    yom

      Hi everybody,

       

      I'm encountering some very strange behaviours with OpenCL and I need some explanations from the AMD community.

      Let describe my problem:

      %-----------------------------------------------------------------------------------------------------------------

      1) Configuration:

      - AMD APP SDK 2.9-1 with Catalyst driver 14.4 (I also tried 14.7 and 14.9) as described here

      - GPU Sapphire Radeon 270X (4 Gb)

      - CPU Intel i5 2400

      - 16 Gb RAM

      - Use of OCL C++ bindings

      - Windows 7 Ultimate

      - Visual Studio Pro 2012

       

      My basic problem is the following, I create a buffer/image, push data on GPU with enqueueWriteBuffer/enqueueWriteImage and then clean memory.

      I monitor my GPU with GPU-Z or Process Explorer in order to control my GPU memory in live.

      So if my buffer/image size is greater or equal than 64 Mb, everything is ok but if my buffer/image size is less than this value, I don't see any release of the GPU memory...

      %-----------------------------------------------------------------------------------------------------------------

      2) Configuration:

      - AMD APP SDK 3.0 Beta with Catalyst driver Omega 14.12 (I also tried 15.7) as described here

      - GPU Sapphire Radeon 270X (4 Gb)

      - CPU Intel i5 2400

      - 16 Gb RAM

      - Use of OCL C++ bindings

      - Windows 7 Ultimate

      - Visual Studio Pro 2012

       

      Once again, I create a buffer/image, push data on GPU with enqueueWriteBuffer/enqueueWriteImage and then clean memory.

      I monitor my GPU with GPU-Z or Process Explorer in order to control my GPU memory in live.

      So if my buffer/image size is greater or equal than 512 Mb, everything is ok but if my buffer/image size is less than this value, I don't see any release of the GPU memory...

      %-----------------------------------------------------------------------------------------------------------------

      My conclusion is that it's not a memory leak since if I iterate the process, there is no accumulation in memory. Maybe the driver keeps in mind the last used memory space and keep it for re-use? Or is it a problem with GPU-Z/Process Explorer and virtual memory? Or Is it a problem with my code? a problem with my video card? a problem in the driver? a problem in the OpenCL library (amdocl64.lib)?

       

      Any help would be greatful!

       

      Please find attached a small visual studio project to reproduce my problem if needed.

       

      Best regards