-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
API DESIGN REVIEW multi-gpu-ratios #9155
Comments
Reposting what I posted on the mailing list thread, so other people can reply to it here: I think this would be a bit of a niche functionality. It is generally a reasonable assumption that all GPU devices on a machine have the same capabilities. |
The problem for me was that I already had a GPU and wanted to buy a new one, so that I would have two. But people keep bringing out new, faster GPUs so the new one I bought was significantly faster. For people who can only afford to occasionally buy one new GPU, this is quite a big deal. It's a shame if you are stuck at the speed for your slowest GPU. I think for people building their own Linux boxes on a shoestring, this must be quite a common problem. James |
I believe this change is valuable for a very important reason: GPUs are very expensive and the proposed change better supports those that can not afford to buy many of the same GPU. I'm a grad student and I bought one pre-owned to get started with deep learning. I then bought another different pre-owned GPU several months later with more memory once I decided it was worth more investment. Update 2018-01-25: I also know of several other people I've collaborated with a bit on open source projects both inside and outside the US with multiple different GPUs in their machine. |
@jinkos could you also consider adding a StagingArea to your changes? I believe your proposed change + a StagingArea could make it possible to get a very substantial performance boost if you have two of the same or two different GPUs. I started such a change at master...ahundt:StagingArea but the dimensions are off and I haven't had the time to fix it. |
>could you also consider adding a StagingArea to your changes? I believe your proposed change + a StagingArea could make it possible to get a very substantial performance boost if you have two different GPUs
StagingArea? TF add to their bloated toolkit so often that I have missed
the whole StagingArea thing. I will experiment with your code for my
current Kaggle competition and report back when I have properly got my
head around it.
Happy to work on anything that makes things faster. If Keras can do for
pipelining what it has done for modelling it would be unstoppable. But
that's a kind of architecture thing and I don't think it can be tackled
with a tweak here and a tweak there.
Interfaces for pipelining seem to be changing faster than interfaces for
modelling at the moment. Is there a Keras strategy/view for this? This
seems crucial, to me.
The 'n different GPUs problem' and the ratios solution is a trivial few
lines of code, it's already written and quite well tested.
|
@TimZaman knows about this intimately. He gave some useful details on another pull request I made a while ago which you can see at #6928 (comment). Since the PR is so long it doesn't always show up, you may have to click "View more" twice, then search for the username TimZaman, there are pictures of tensorboard there. |
Fixing skewed GPU ratios.First response Nuanced response Optimal graphKeras puts the user first, with a proper tradeoff with speed. If you deeply care about perf, use @ahundt coming to GTC? |
What can we do to improve |
@fchollet iirc Another problem is that for multi-gpu, the StagingArea won't work as well; since your StagingArea should be on GPU ideally; you need to add the StagingArea per GPU. Since @fchollet are you doing a book signing at GTC? |
By
I'll give it another try when 1.5 is released, last time I tried
It sounds great but I don't think I can get funding for it. |
I mean: don't mix different gpu types in one system. |
@ahundt you probably want from tensorflow import keras
K = keras.backend |
This was in the plans but I haven't had any update on it for a while. Maybe? |
Closing since we won't implement this API change. |
Thanks for indulging me it's been a great discussion.
…On 26/01/2018 22:33, François Chollet wrote:
Closed #9155 <#9155>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9155 (comment)>, or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AA_N3iXS09wNt125X1w73KkeCQoFV6z8ks5tOlLEgaJpZM4Rm_U5>.
|
Too late, but so far together they have certainly been faster than one 👍. Prices are too high for me to do anything differently at the moment, thanks bitcoin. :-) |
Why are those faster in tf.keras? |
I am submitting the following design suggestion document...
API Design Review Document
see My Github Tutorial
Summary
A modified version of keras.utils.multi_gpu_model() that takes an extra parameter: a list of ratios denoting how the GPU load should be split. e.g...
multi_gpu_model(model,gpus=[0,1],ratios=[4,3]) will spread the samples per batch roughly in the ratio of 4:3 between GPU:0 and GPU:1
The text was updated successfully, but these errors were encountered: