Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Platforms forum
clImportMemoryARM return CL_OUT_OF_HOST_MEMORY
Jump...
Cancel
State
Accepted Answer
Locked
Locked
Replies
1 reply
Subscribers
22 subscribers
Views
7261 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
clImportMemoryARM return CL_OUT_OF_HOST_MEMORY
qdev
over 4 years ago
The code is like this:
cl_mem buffer = clImportMemoryARM(context,
CL_MEM_READ_WRITE,
NULL,
ptr,
size,
&err);
if ptr is a newly malloc buffer pointer, like
char* ptr = (char*)malloc(size);
it works fine.
However, when passing into a third party library pointer (accessible from CPU), let's call it coolPtr, it will return error code -6, which is CL_OUT_OF_HOST_MEMORY
cl_mem buffer = clImportMemoryARM(context,
CL_MEM_READ_WRITE,
NULL,
coolPtr,
size,
&err);
I can do other operations with coolPtr successfully, like I can
memcpy(dstPtr, coolPtr, size);
Then why does the clImportMemoryARM fail for coolPtr? Thanks!
Top replies
Zhifei Yang
over 4 years ago
+1
verified
It may depend on the clImportMemoryARM() implementation about the memory attribute check. Possibly, the third-party library pointer has different memory attributes (read/write/execute/shareability...