Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: disappointing CUDA speed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114170] Re: disappointing CUDA speed
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 26 Nov 2010 05:26:58 -0500 (EST)

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

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

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

>AbsoluteTiming[CUDADot[randM, randM];]
>{7.328353,Null}

>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