cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

binghy
Adept II

CL_MEM_USE_PERSISTENT_MEM_AMD flag implementation

Jump to solution

Hi,

I was getting closer to zero copy buffers and their features (both device-resident and host-resident zero copy buffers).

Even if on my system the Transfer Overlap sample runs fine, with no problems about buffer flags, I realized that creating a buffer from scratch in another VS project with the flag CL_MEM_USE_PERSISTENT_MEM_AMD results as an error (flag not defined).

Since my laptop configuration should support zero copy buffer (GPU: AMD Radeon HD R9M290X (GCN), Driver Version: 1268.1 (VM), OS: Win7, System Architecture: 64-bit machine), I hardly believed the CL_MEM_USE_PERSISTENT_MEM_AMD flag was an option already coded in OpenCL. I checked in the cl.h header file and there's no declaration about it.

So, it's just a matter of declaring a struct and all the flags to comprise the CL_MEM_USE_PERSISTENT_MEM_AMD one (as in the Transfer Overlap sample), or I'm missing something else (like paths or other header files attached to that sample and that have to be included in the VS project for working with the CL_MEM_USE_PERSISTENT_MEM_AMD flag available)?

Thanks

Marco

0 Kudos
Reply
1 Solution

Accepted Solutions
dipak
Staff
Staff

Re: CL_MEM_USE_PERSISTENT_MEM_AMD flag implementation

Jump to solution

Hi Marco,

CL_MEM_USE_PERSISTENT_MEM_AMD and other AMD specific flags/macros are defined in the header file "cl_ext.h"  under <AMDAPPSDKROOT>/include/CL. You may include this header file explicitly or may include the header file "opencl.h" [under same directory as cl_ext.h] which implicitly includes all related headers including cl_ext.h. Please try and let us know if face any problem.

Regards,

View solution in original post

0 Kudos
Reply
3 Replies
tzachi_cohen
Staff
Staff

Re: CL_MEM_USE_PERSISTENT_MEM_AMD flag implementation

Jump to solution

I believe that by "error (flag not defined)" you get a compilation error not a run time error, correct ?

The persistent mem flag is defined in 'cl_ext.h' that ships with the AMD APP SDK.

dipak
Staff
Staff

Re: CL_MEM_USE_PERSISTENT_MEM_AMD flag implementation

Jump to solution

Hi Marco,

CL_MEM_USE_PERSISTENT_MEM_AMD and other AMD specific flags/macros are defined in the header file "cl_ext.h"  under <AMDAPPSDKROOT>/include/CL. You may include this header file explicitly or may include the header file "opencl.h" [under same directory as cl_ext.h] which implicitly includes all related headers including cl_ext.h. Please try and let us know if face any problem.

Regards,

View solution in original post

0 Kudos
Reply
binghy
Adept II

Re: CL_MEM_USE_PERSISTENT_MEM_AMD flag implementation

Jump to solution

Thank you!

Yes, just a compilation error. It seemed strange to me it was not defined, but I did not find the header with the CL_MEM_USE_PERSISTENT_MEM_AMD declaration.

Appreciate!

Regards,

Marco

0 Kudos
Reply