N3PDF / mcgpu

Proof of concept of GPU integration
0 stars 0 forks source link

First Steps #2

Open scarlehoff opened 5 years ago

scarlehoff commented 5 years ago

Before we start focusing on physical processes (see issue #1) I think we should have a first test of a MonteCarlo integration that spans all the different systems we want to try, since by the end of this year we expect to have two FPGA (one from intel one from xilinx), an ATI gpu, an nvidia GPU, an amd CPU and an intel CPU .

I think having a toy model of just the MC should be the first step (at least it would be for me so I've assigned myself to this issue).

My plan is to write a simple MC with importance sampling for the following architectures (in C++). The function to integrate is not important.

Versions

Extras

Bonus tracks:

I expect all of these options below to be slower, but I am curious to know how they behave

Extra motivations

Apart from everything I wrote at the top there are other reasons why I think this is a good idea:

  1. I have not googled in depth* (I'm writing this here now mostly so I don't forget) but the fact that no google result** shows such a raw comparison makes me think this is something interesting to do. Probably a lot of people dismiss it as "trivial" but even if it is, just having an open library with all the options seems interesting enough for me.
  2. Having so many devices to test we will want to have unit tests and nothing better than this.
  3. If we want to get rich with the stock market this is the way to go, given than 90% of the results I found related to finance...
  4. To have a document/link to send companies when we ask for devices worth $5000 for free.

*I found an article that seemed interesting BUT it was paywalled and I am at home so I couldn't read it. So much for open science. **I mean, "monte carlo integration xilinx" gives only three pages in google.

A quick edit: I think it would be very valuable if we do this and indeed write a tutorial/document and open-source the code.

scarrazza commented 5 years ago

It looks like there is an alternative to numba from google: https://github.com/google/jax