Open zif520 opened 8 years ago
hmm this is an interesting question. we did not try in OpenCL1.1, the first step will be figuring out what has been new OpenCL1.2 vs 1.1, and removed the new functions of 1.2
in case it's useful, I know that clBLAS 2.4 worked ok in 1.1, back in the days when NVIDIA only supported 1.1
1.1 is quite old now, and recent Adrenos support not just 1.2 but 2.0 https://en.wikipedia.org/wiki/Adreno
thanks for all , i found most of mali GPU only supply opencl 1.1 ,i also refer to https://github.com/naibaf7/caffe to do it ,perhaps i will complete it some days ,but there is some problems now.
Sounds cool. Just out of curiosity, which 1.2 functions are being used?
@hughperkins we only use opencl 1.1 ,and now it is worked ok with ViennaCL ,but there are a little slow,so i want to try clblas now. my telephone is mate8 mali T880
Sounds good. You have two approaches really:
To insert shims, what I would do is:
I would think you wouldnt want to directly modify the clew library, but create a new library (call it opencl-1.2-on-1.1 for example), which will stub out the clew methods, ie by overwriting the function pointers eg at https://github.com/hughperkins/clew/blob/master/src/clew.c#L112 )
@hughperkins thanks for your illustration.: ) , i will try it !
I was able to compile OpenCL-caffe with clBLAS 2.4 (and openBLAS 0.2.17). But what really stopped me in my tracks was this:
// src/caffe/device.cpp
namespace caffe {
#ifndef CPU_ONLY
string buildOption = "-x clc++ ";
and then this:
// src/caffe/ocl/util.cl
#pragma OPENCL EXTENSION cl_amd_printf : enable
template <class T>
__kernel void OCL_memset(__global T* buffer, const T value, const int size, const int buf_offset) {
C'mon, using templates with OpenCL 1.x?
:-D
@psyhtest Here this one has OpenCL 1.1 support: https://github.com/BVLC/caffe/tree/opencl
@naibaf7 Yes, I'm using your port now - and it's much more promising! :+1: I hope to provide you some contributions in due course.
@zif520 I used to lead the OpenCL compiler team for the ARM Mali GPUs, so I'm always happy to see people using Mali. :+1: I do not, however, think you can get good performance with clBLAS. I plan to connect another BLAS library that can be tuned for embedded GPUs.
I plan to connect another BLAS library that can be tuned for embedded GPUs.
which library is this?
@hughperkins https://github.com/CNugteren/CLBlast
Thanks!
So what version of OpenCL does this actually support? Does it support 1.2?
i want to use zhe opencl caffe in android ,but only support opencl 1.1,can i use it but only chang little function?