MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: CUDADot[] does not work with rectangular matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115932] Re: CUDADot[] does not work with rectangular matrices
  • From: Gabriel Landi <gtlandi at gmail.com>
  • Date: Wed, 26 Jan 2011 05:05:55 -0500 (EST)

I know it's been a while but I accidentally found this:
http://reference.wolfram.com/mathematica/CUDALink/tutorial/Applications.html

There is a section on implementing matrix-vector product.


On Thu, Jan 13, 2011 at 6:26 AM, Sjoerd C. de Vries <
sjoerd.c.devries at gmail.com> wrote:

> Same here. In addition to this, I also found that at least some CUDA
> functions don't like rationals for input.
>
> CUDAImageConvolve[img, {{-1, 1, 1}, {-2, 0.1, 2}, {-1, 1, 1}}] works
> but
> CUDAImageConvolve[img, {{-1, 1, 1}, {-2, 1/10, 2}, {-1, 1, 1}}]
> doesn't
>
> (with img some kind of image)
>
> Cheers -- Sjoerd
>
> On Jan 12, 1:22 am, Koslicki <kosli... at math.psu.edu> wrote:
> > It seems like CUDADot[] does not work with rectangular matrices. For
> > example:
> >
> > In[80]:= Dot[{{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}},
> > {125,25,5,1}]
> > Out[80]= {194,194,194,194,194}
> >
> > Yet
> >
> > In[81]:= CUDADot[{{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}},
> > {125,25,5,1}]
> > During evaluation of In[81]:= CUDADot::invdim: CUDALink encountered an
> > object with invalid dimensions. >>
> > Out[81]= CUDADot[{{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}},
> > {125,25,5,1}]
> >
> > So unless the first matrix is square with the same dimensions as the
> > vector, CUDADot[] will not work.
> >
> > Has anyone else come across this and/or found a workaround?
> >
> > Thanks,
> >
> > ~David
>


  • Prev by Date: Re: Fast matrices comparison
  • Next by Date: Re: Recursive function
  • Previous by thread: Re: CUDADot[] does not work with rectangular matrices
  • Next by thread: question on diophantine equations in Mathematica