Sorry, I make a mistake. we think solution B is better than solution A
在2015-06-19 17:54:48,陈海波<[email protected]>写道:
> hi,wang~
> Two solutions for GPU API:
> solution A)
> In each neural network layer, two menthods(CPU and GPU) are
> implemented
> in feedforward propagation and backforward propagation funtcion module.
> solution B)
> modify Blob class,we add a device template parameter(CPU/GPU),there
> may be two choices for parameter:
> 1) use mshadow::cpu/gpu
> 2) declare a global parameter in SINGA
>
> we think solution A is better.
>
> Wang'question:
> We currently use mshadow for maxtrix computation.If we want to use
> another matrix libray instead of mshadow,how do we?
>
> I think matrix library can be divided into three levels:
> base level library:
> for GPU computation,cudamaxtrix;for CPU computation,mkl、openblas、atlas
> and son on.
> middle level library:
> both cpu and gpu matrix computation,mshadow
> high level library:
> abstract matrix interface which encapsulate some middle level matrix
> libraries.
>
> I think it's a hard problem we add many middle level libraries into
> SINGA. Because the difference between middle libraries is
> so large that we can't integrate them together effeively. And GPU
> function module should be integrated into SINGA in our first step.
> Then If we want to add a new middle level library,the better way is to
> design a set of high level interfaces.
> thanks~