MathGroup Archive 2010

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

Search the Archive

Re: disappointing CUDA speed

On 11/25/10 at 5:56 AM, gianluca.gorni at (Gianluca Gorni)

>I have a 1 year old Apple MacBookPro. I installed the
>cudadriver_3.1.17_macos and then tried the first examples in the

>Needs["CUDALink`"] CUDAQ[]
>randM = RandomReal[1, {3000, 3000}]; AbsoluteTiming[randM.randM;]

>AbsoluteTiming[CUDADot[randM, randM];]

>Quite a letdown. Did I do something wrong?

>CUDAInformation[] {1 -> {"Name" -> "GeForce 9400M",

No, you didn't do something wrong. The problem is the limited
capability of the GeForce 9400M. In particular, the GeForce
9400M doesn't support double precision. Using RandomReal you
have made a matrix of double precision reals, the default
machine precision number in Mathematica.

Change randM to a smaller matrix of integers. For example, on my
MacBookPro I get

In[6]:= randM = RandomInteger[{1, 10000}, {500, 500}];

In[7]:= AbsoluteTiming[randM.randM;]

Out[7]= {2.030581,Null}

In[8]:= AbsoluteTiming[CUDADot[randM, randM];]

Out[8]= {0.036325,Null}

  • Prev by Date: Re: Mathematica 8 is now available
  • Next by Date: Re: understanding code
  • Previous by thread: disappointing CUDA speed
  • Next by thread: Re: disappointing CUDA speed