Pinned memory OpenCL, has anybody successfully used it?

南笙酒味 提交于 2019-12-14 01:28:49

问题


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 use 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.


回答1:


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.



来源:https://stackoverflow.com/questions/3978699/pinned-memory-opencl-has-anybody-successfully-used-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!