CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.67k stars 7.86k forks source link

Performance question #350

Closed hankroark closed 6 years ago

hankroark commented 6 years ago

For Ch1_Introduction_PyMC3.ipynb, when the sampling is run at the end I noticed that the checked in notebook got about 4.5k iterations / sec. I run the same on my 2017 MBP and I get about 40 iterations / second. Any thoughts on the difference (or what kind of configuration gets 4500 its/sec?)

syzer commented 6 years ago

I know it doesn't answer, but i7 can go over 2k easily.

twiecki commented 6 years ago

@hankroark Do you have the mkl libraries installed (conda provides them)?

hankroark commented 6 years ago

@syzer well then, I ought to be able to do 2k easily. At least I know I've got the hardware. @twiecki just checked that mkl is installed

I just noticed a new warning when I re-ran the notebook, not sure why I didn't see it before. I check into it and get back: WARNING (theano.configdefaults): Only clang++ is supported. With g++, we end up with strange g++/OSX bugs. WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.

twiecki commented 6 years ago

Well, there's your answer :).

hankroark commented 6 years ago

I recently updated Xcode, which needed the license accepted. Once I accepted the license all was better (~2500-3000 its/sec). Thanks for the help!!