Closed pranavm1502 closed 6 years ago
I have been using distributed Tensorflow for another project but from my experience with it, it is intended to be used for different machines or multiple gpus. When a regular Tensorflow code is run on cpu:0, this is already including all cores of the cpu so our comparisons was with the cpu using all of its cores. You could try to pin some of your code to different cores doing something like here https://stackoverflow.com/questions/39893161/why-does-tensorflow-only-find-one-cpu-device-despite-having-multiple-cores but I don't think you will gain much.
Sent from my iPhone
On Jul 20, 2018, at 12:42 PM, Pranav Mundada notifications@github.com<mailto:notifications@github.com> wrote:
As per your paper, CPU is faster than GPU for small Hilbert spaces (dim<100). I wonder if distributed Tensorflow can be used to make this package run on multiple CPU cores. This might give a boost to the speed. Thoughts?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/SchusterLab/quantum-optimal-control/issues/12, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARfIQE7WGnDhxRpJbWbblSBl61KH3Zekks5uIhZJgaJpZM4VYm89.
Thanks for the insight! While running Grape, only 1 core was active on our machine while the remaining 39 cores were inactive. Not sure if I need to change some setting.
I am sure the default for Tensorflow is to try to use all cores. But maybe your application didn't really need more than one for some of the reasons pointed out in the answer here:
https://stackoverflow.com/questions/50509741/optimizing-tensorflow-for-a-32-cores-computer
There might be a more effective way to use the cores than to leave it to Tensorflow to decide but I am not quite sure about them. The best I could find for Tensorflow cpu settings is https://www.tensorflow.org/performance/performance_guide#optimizing_for_cpu So maybe try changing the config.inter_op_parallelism and same for the intra ops and see if that helps speeding things up.
Sent from my iPhone
On Jul 20, 2018, at 1:26 PM, Pranav Mundada notifications@github.com<mailto:notifications@github.com> wrote:
Thanks for the insight! While running Grape, only 1 core was active on our machine while the remaining 39 cores were inactive. Not sure if I need to change some setting.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/SchusterLab/quantum-optimal-control/issues/12#issuecomment-406687632, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARfIQEyOBCVQK5zhNLUvRfjLRVLdcYDyks5uIiCWgaJpZM4VYm89.
As per your paper, CPU is faster than GPU for small Hilbert spaces (dim<100). I wonder if distributed Tensorflow can be used to make this package run on multiple CPU cores. This might give a boost to the speed. Thoughts?