Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monte_Carlo_Euler_Scheme.ipynb #15

Closed
PBRAOS opened this issue Nov 25, 2019 · 3 comments
Closed

Monte_Carlo_Euler_Scheme.ipynb #15

PBRAOS opened this issue Nov 25, 2019 · 3 comments

Comments

@PBRAOS
Copy link

PBRAOS commented Nov 25, 2019

There is some problem on the reported time for GPU vs CPU on multiple dimensions 100.
I am using a single GPU and it is slower compared to my CPU multithreading. I am wondering why... The rest of the notebooks work as expected.
I am using a GeForce 1080 not a TESLA v100 GPU, but intuitively i would expect to have a similar speedup...

Any ideas why I get this behaviour ?

Regards,
pb

@cyrilchim
Copy link
Contributor

Hi Panagiotis,

Could you please check if this is the case for float32 (I assume you are running for the default float64 dtype)? Geforce 1080 performance peaks for float32:
https://www.microway.com/knowledge-center-articles/comparison-of-nvidia-geforce-gpus-and-nvidia-tesla-gpus/

Could you please report the running times as well?

Thanks,
Cyril

@PBRAOS
Copy link
Author

PBRAOS commented Dec 9, 2019

@cyrilchim
Using Tensorflow 1.15.0
Running on CPU with 12 cores and GeForce 1080 GPU.

Sampling on a CPU. Note TensorFlow does automatic multithreading.
dtype = np.float64
Time (seconds) to price a European Call Option on a CPU: 0.7360169887542725
dtype = np.float32
Time (seconds) to price a European Call Option on a CPU: 0.5771586894989014
Time (seconds) to price a European Call Option using QuantLib: 20.81744885444641

Sampling from a 100-dimensional process. GPU vs CPU comparison
Time (seconds) to sample 100000 paths on a CPU: 39.573535680770874
dtype = np.float64
Time (seconds) to sample 100000 paths on a GPU: 302.6458942890167 (????? TOO MUCH, WHY???)
dtype = np.float32
Time (seconds) to sample 100000 paths on a GPU: 0.9838593006134033

@cyrilchim
Copy link
Contributor

cyrilchim commented Dec 9, 2019

@PBRAOS
I think these results are very much consistent with the statements from the article I've shared: GeForce 1080 double precision performance is poor (they state that the performance is 32 times worse for double precision compared to single). This factor of 32 is part part of the card design: https://www.guru3d.com/articles-pages/nvidia-geforce-gtx-1080-review,3.html

@PBRAOS PBRAOS closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants