Pinned memory OpenCL, has anybody successfully used it?
I used the CL_MEM_ALLOC_HOST_PTR
flag with my clCreateBuffer
calls, but the Compute Profiler shows all my "host mem transfer type" as being Pageable. I tried it in two different kernel setups, but the profiler wouldn't show that I was using pinned memory.
Is it just really random when a kernel gets to u开发者_如何学Cse pinned memory? Is it constrained by something? I am guessing the size of the buffer matters. I tried one buffer of a size of 10,000 floats and I still got Pageable memory. Let me know what you all think.
If you check the OpenCL programming guide (3.1) it is mentioned in section 3.3.1 that OpenCL has now control over memory objects are allocated pinned or not. You can only TRY to create them using CL_MEM_ALLOC_HOST_PTR.
精彩评论