Login  Register

Re: Kooql

Posted by Mark joshi-2 on Jul 24, 2010; 11:06pm
URL: http://quantlib.414.s1.nabble.com/Kooql-tp7085p7094.html

Dear Klaus

thanks for your comments. I haven't done much playing with this aspect
since this not where my bottlenecks are at the moment.

NB we now have a working skip method in the CUDA Sobol so you can call
it multiple times and get the next set of paths in each time. We also
skip the first path of zeros.

regards

Mark


On 24 July 2010 09:30, Klaus Spanderen <[hidden email]> wrote:

> Hi Mark,
>
> I'm also using a CUDA Sobol generator based on Mike Giles version. IMHO stride
> in line 94 and 245
>
>  stride = gridDim.x * blockDim.x;
>
> should be a power of two.  blockDim.x is equal to threadsperblock which is 64.
> I'm also ensuring that dimGrid.x is a power of two by setting
>
>        dimGrid.x = 1;
>        int n = 1 + 31 / nDimensions;
>        while (n >>= 1) dimGrid.x <<= 1;
>
> at line 338ff. (As nDimensions is usually larger than 31 for your problems
> this might not be an issue for your examples).
>
> cheers
>  Klaus
>
> On Friday 23 July 2010 06:54:35 Mark joshi wrote:
>> Dear All,
>>
>> so I finally made some progress on integrating CUDA and Quantlib.
>>
>> In particular, I have developed two classes
>>
>> MarketModelEvolverLMMPC_CUDA
>>
>> and
>>
>> SobolCudaBrownianGenerator
>>
>> The first of these does LMM path generation on the GPU in the spot
>> measure using predictor-corrector and can be directly fitted into the
>> MarketModels code.
>>
>> The second generates a MultiDimensional Brownian motion using Sobol
>> and Brownian bridging and the paths can then be used in any application.
>>
>> Typical timing to price 32 caplets,
>> 32 rates, 32 steps, 32 factor model
>>
>> 524272 paths
>>
>> using cuda evolver: 32 seconds, of which 7 seconds on path generation
>> and 6 seconds on transferring paths to CPU
>>
>> using QL evolver : 135 seconds
>>
>> using QL Evolver with SobolCudaBrownianGenerator: 79 seconds.
>>
>> The code can be obtained via the subversion repository at
>> kooderive.sourceforge.net
>>
>> Clearly, much greater speed-ups are possible but will involve more
>> code redesign to avoid transferring complete paths from GPU to CPU.
>>
>> regards
>>
>> Mark
>
>
>



--


Assoc Prof Mark Joshi
Centre for Actuarial Studies
University of Melbourne
My website is www.markjoshi.com

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users