Boost logo

Ublas :

Subject: Re: [ublas] cublas bindings
From: Karl Rupp (rupp_at_[hidden])
Date: 2010-07-19 02:54:33


Hi Andrey,

maybe you can get some inspiration for your bindings from our ViennaCL
library: http://viennacl.sourceforge.net/

Instead of CUDA, it uses OpenCL, but in fact the same issues like
host-to-device transfer are covered.

Best regards,
Karli

On 07/19/2010 08:10 AM, Andrey Asadchev wrote:
>
>
> On Mon, Jul 19, 2010 at 1:01 AM, Rutger ter Borg <rutger_at_[hidden]
> <mailto:rutger_at_[hidden]>> wrote:
>
> Andrey Asadchev wrote:
>
> > hello
> >
> > I just started working on cublas bindings for ublas using
> > numeric::bindings
> >
> > Here is my project page:
> >
> http://code.google.com/p/asadchev/source/browse/#svn/trunk/projects/boost/numeric/bindings/cublas
> >
> > can you give me some feedback if you are willing?
> > also, if you would like to collaborate, that would be great
> >
> > Thank you
>
> Hello Andrey,
>
> that's interesting. In what terms is it different from the current BLAS
> bindings, where CUBLAS support is built-in? CUBLAS bindings are
> generated
> from C-header files from NVidia. To enable, define
> BOOST_NUMERIC_BINDINGS_BLAS_CUBLAS. Having said that, CUBLAS support is
> untested and we're still looking for matrix and vector structures
> that live
> on the GPU.
>
> Further questions and/or comments are welcome.
>
> Cheers,
>
> Rutger
>
>
>
> thank you
>
> I was not aware off existing bindings.
> I will definitely take a look at them.
> I am trying to make implementation little bit more like expressions,
> rather than fortran counterpart:
>
> Here is an example:
>
> cublas::matrix<double> A;
> cublas::matrix<double> B;
> B = cublas::matrix<double>(5,5);
> A = B; // device to device copy
>
> ublas::matrix<double> h(cublas::host(B)); // device to host copy
> ublas::matrix<double, ublas::column_major> f;
> cublas::host(f) = A; // device to host copy
>
> cublas::matrix<double> C = cublas::gemm(A, B);
> B += cublas::gemm(A, C);
> cublas::gemm(3.0, B, C, 6.0, A); // fortran style dgemm
>
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: rupp_at_[hidden]