Re: [Quantlib-dev] Cuda Port for Quantlib

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] Cuda Port for Quantlib

Kim Kuen Tang
Hi all,

in fact there already exists an implementation of LMM or BGM with cuda.
See http://people.maths.ox.ac.uk/~gilesm/hpc/
There the user must input a vector of random numbers and the gpu
calculates a very large numbers of path for the simulation.
As a result the speed becomes 50 to 100 times faster compared to the
calculation by cpu.
And 100x+ faster is fundamentally different. It makes new application
possible and it is worth considering even  new platform or hardware.
So it is worth learning it.

My 2 cent:
The first step of using cuda in LMM is to write a new random generator
using the gpu. (There already exists an example in the sdk of cuda.)
After that the evolver class in market model should also be modified to
support cuda.

Another point:
As stated before the compiler of cuda (called nvcc) only supports C. And
QuantLib is completely coded in C++. That means you have to integrate C
in C++. This sounds trivial, but a wide range of problems may occur as
discussed by Meyer.

with regards,
Kim Tang

Mike S schrieb:

>> maybe there is no use for this right now
>>    
> That's doubtful, if i may dare to speculate.
> Perhaps Mr. Joshi (or anyone) could provide a reference to
> parallelizable parts of the LIBOR Market Model ?
> Certainly http://scholar.google.com ought to have something to say, as well...
> -Mike
>
> On Tue, Sep 23, 2008 at 10:11 AM, Jose Luis San Martin
> <[hidden email]> wrote:
>  
>> Hi Luigi,
>> Thank you for your response.
>> About C++ compatibility i think there is no problem. I tried some examples
>> that comes with the SDK about the c++ integration and works without problem.
>> Even there is integration with python.
>> Quoting wikipedia "CUDA (Compute Unified Device Architecture) is a compiler
>> and set of development tools that enable programmers to use a variation of C
>> to code algorithms for execution on the graphics processing unit (GPU)."
>>  Cuda uses the high performance of the GPUs with parallel data to improve
>> your application performance.
>> You only need to migrate to cuda the portions of your code that needs
>> high parallelism. The rest of the code might remain in C++. And as you can
>> see on wikipedia, cuda is only available in the new Nvidia Geforce (Since 8
>> Series), maybe there is no use for this right now, but everything have a
>> start ;)
>> If you can get me in touch with Mark, I'll be grateful.
>> Regards,
>> On Mon, Sep 15, 2008 at 5:49 PM, Luigi Ballabio <[hidden email]>
>> wrote:
>>    
>>> On Fri, 2008-09-05 at 14:39 +0200, Jose Luis San Martin wrote:
>>>      
>>>> I'm interested in the Cuda port for QuantLib, at the moment I'm
>>>> looking for an open source project with high performance requirements.
>>>> I have no idea about quantitative finance but i have no problem with
>>>> learn about it.
>>>>
>>>> The first thing i need is some advice to know where to start, which
>>>> module could be easy to understand to start analyzing code to evaluate
>>>> if is possible the Cuda port.
>>>>        
>>> Hi Jose Luis,
>>>        sorry for the delay.  I don't know much about CUDA, except for a
>>> quick
>>> look at the site (maybe you could provide a short overview?) so you'll
>>> forgive the question: does CUDA require C code? (In which case we're out
>>> of luck---QuantLib is C++ and not easily rewritable in a procedural
>>> way.)  As for a candidate module, I guess that right now the most
>>> computationally intensive, and also one that could make use of
>>> parallelization, is the market-model code (i.e., the stuff in
>>> <ql/models/marketmodels>.)  If a port is possible, and if you're still
>>> interested, you might want to get in touch with Mark Joshi; he wrote
>>> most of the market-model code and might be interested in exploring the
>>> possibility (Mark, are you reading this? Care to step in with any
>>> thoughts?)
>>>
>>> Later,
>>>        Luigi
>>>
>>>
>>>
>>> --
>>>
>>> Glendower: I can call spirits from the vasty deep.
>>> Hotspur: Why, so can I, or so can any man;
>>> But will they come when you do call for them?
>>> -- King Henry the Fourth Part I, Act III, Scene I
>>>
>>>
>>>      
>>
>> --
>> .:. Jose Luis .:.
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> QuantLib-dev mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>>
>>
>>    
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] Cuda Port for Quantlib

Georgy Jikia
it seems commercial vendors are already starting to use cuda for quant. finance
 


 
On Tue, Sep 23, 2008 at 10:50 PM, Kim Kuen Tang <[hidden email]> wrote:
Hi all,

in fact there already exists an implementation of LMM or BGM with cuda.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] Cuda Port for Quantlib

Eric Ehlers-2
In reply to this post by Kim Kuen Tang
Hello,

On Tue, September 23, 2008 21:50, Kim Kuen Tang wrote:
> Another point:
> As stated before the compiler of cuda (called nvcc) only supports C. And
QuantLib is completely coded in C++. That means you have to integrate C in
C++. This sounds trivial, but a wide range of problems may occur as
discussed by Meyer.

An earlier release of QuantLibAddin supported a C interface.  That build has
not been maintained but it would not be too hard to resurrect it.

Regards,
Eric

-------------------------
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
Distributed computing for pricing analytics - Use Microsoft Excel as a client
to the Grid


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users