Posted by
Klaus Spanderen-2 on
Jul 23, 2010; 11:30pm
URL: http://quantlib.414.s1.nabble.com/Kooql-tp7085p7093.html
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
------------------------------------------------------------------------------
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