Skip to content

Commit

Permalink
Mali GPU does not support host unified memory in fact #53
Browse files Browse the repository at this point in the history
- as solution provided compilation param
DISABLE_DEVICE_HOST_UNIFIED_MEMORY
to force disabling support host unified memory
  • Loading branch information
Daniil Efremov authored and defremov committed Feb 2, 2017
1 parent 948aa8e commit 1dd40c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/caffe/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ void device::Init() {
workgroup_sizes_[0] = temp[0];
workgroup_sizes_[1] = temp[1];
workgroup_sizes_[2] = temp[2];

#ifdef DISABLE_DEVICE_HOST_UNIFIED_MEMORY
host_unified_ = false;
LOG(INFO) << "CL_DEVICE_HOST_UNIFIED_MEMORY: disabled";
#else
cl_bool host_unified;
clGetDeviceInfo(ctx.devices()[0].id(),
CL_DEVICE_HOST_UNIFIED_MEMORY,
sizeof(cl_bool), &host_unified, NULL);

LOG(INFO) << "CL_DEVICE_HOST_UNIFIED_MEMORY: " << host_unified;
host_unified_ = host_unified;
#endif // DISABLE_DEVICE_HOST_UNIFIED_MEMORY
SetProgram();

for (int q = 0; q < GREENTEA_QUEUE_COUNT - 1; ++q) {
Expand Down

0 comments on commit 1dd40c4

Please sign in to comment.