Open gplhegde opened 7 years ago
This is a known issue. Please compile Caffe with the following option:
DISABLE_DEVICE_HOST_UNIFIED_MEMORY
@gplhegde The zero copy function requires to get the same address with clEnqueueMapBuffer API. This assertion indicates that your platform could not meet this requirement. Maybe it's better to disable the unify_memory automatically for this case. @naibaf7 what's do you think?
Thanks for your response. Disabling the unified memory solves the assertion. However, I see two major issues.
Do you see any way to overcome these? clEnqueueMapBuffer works for other sample OpenCL applications that I tested on my platform. I am wondering what special requirement is needed here.
@gplhegde OpenCL Caffe so far only has been optimized for AMD, nVidia and Intel GPUs. Mali and Adreno GPUs are not running optimally yet, however I do have an Asus Tinkerboard on my own and am working on suitable kernels for those chips as well.
@naibaf7 Thanks for your response. I understand the reason behind the slow performance. However, I am wondering why the functional correctness is an issue here. I am getting results from the GPU mode which differ by large margin compared to CPU mode. Are you seeing any such issues? Small differences of the order 1e-6 are expected as the float ops are being carried out different hardware. However, I see differences like 0.6 vs 0.9 !
@gplhegde I haven't done verification on Mali on functional correctness either. It should not occur however sometimes there are issues in the OpenCL implementation by vendors. So far I have only verified results on nVidia, AMD and Intel GPUs. However a large update that will hopefully also take care of some Mali related issues will be released soon.
@gplhegde @naibaf7 @gongzg Hi,guys. while i test with alexnet ,it works well,but if i test with googlenet the same problem as @gplhegde happened. And my device query is the same as @gplhegde . What can i do with it?
Hi, I am trying OpenCL Caffe on ASUS TinkerBoard that has integrated Mali GPU. I am able to compile the OpenCL caffe using ViennaCL and successfully run the OpenCL layer tests (below is the test log). However, when I try to run the Alexnet model application using GPU mode, the mapping of device buffer fails leading to an assertion as below.
Issue Log
linaro@linaro-alip:/opt/opencl-caffe$ ./distribute/bin/caffe.bin time -model ./models/bvlc_alexnet/deploy.prototxt -gpu 0 I1125 05:02:52.698902 32653 caffe.cpp:391] Use GPU with device ID 0 I1125 05:02:52.701169 32653 device.cpp:62] CL_DEVICE_HOST_UNIFIED_MEMORY: 1 ..