Re: [eigen] Using Eigen in CUDA kernels

[ Thread Index | Date Index | More Archives ]

On Thu, Feb 7, 2013 at 7:21 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
Hi list,

good news, NVCC (the CUDA compiler from NVidia) version 5 is now able
to parse and compile Eigen :) That means using Eigen in our cuda
kernels is "just" a matter of qualifying all our functions callable
from CUDA by __device__ when compiled with nvcc. As a proof of concept
I've created a fork there:

This port is far to be complete, but I've been able to do stupid stuff like:

Matrix3f M(data1+tid*9);
Vector3f v = M.inverse() * Map<Vector3f>(data+tid*3);
output[tid] = v.cwiseAbs().maxCoeff();

where data1, data, and output are device buffers. The generated
assembly looked reasonable.

So no more crappy home-made fixed-size matrix and vector classes!

Is this statement referring to Eigen's existing fixed-size matrices and vectors?. If so, I don't get it.


This also means that evaluating very large *coefficient-wise
expressions* on CUDA should not be very difficult. We just need a
special DeviceMatrix storing its data in device memory, and specialize
its assignment operator to call a CUDA kernel templated with the
destination and source _expression_...

have fun,

Adolfo Rodríguez Tsouroukdissian
Senior robotics engineer

c/ Pujades 77-79, 4º4ª
08005 Barcelona, Spain.
Tel. +34.93.414.53.47
Skype: adolfo.pal-robotics
Facebook - Twitter - PAL Robotics YouTube Channel

AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.

Mail converted by MHonArc 2.6.19+