tensorflow-wavenet icon indicating copy to clipboard operation
tensorflow-wavenet copied to clipboard

Improve GPU performance

Open ibab opened this issue 8 years ago • 6 comments

The performance of the network on GPUs seems to be lagging behind the CPU performance. I suspect that this is because the 2D convolution isn't designed to work efficiently if the height of the input is 1. It shouldn't be too difficult to write some custom code to perform an efficient 1D convolution. For example, fft could be used for this.

ibab avatar Sep 17 '16 11:09 ibab

https://github.com/tensorflow/tensorflow/issues/1136

bhack avatar Sep 18 '16 09:09 bhack

Just compared GPU and CPU again, and this time training is significantly faster on the GPU.

ibab avatar Sep 20 '16 23:09 ibab

Is this solved then?

lemonzi avatar Oct 06 '16 15:10 lemonzi

We would probably be able to train larger networks (and with larger sample sizes) if we had a single C++ op that does causal 1d convolution, as we would be able to avoid all the extra copying that's currently being done. But writing and maintaining the op might be a pain :/

ibab avatar Oct 06 '16 22:10 ibab

I've done it before, but not with gpu support...

On Thu, Oct 6, 2016, 18:58 Igor Babuschkin [email protected] wrote:

We would probably be able to train larger networks (and with larger sample sizes) if we had a single C++ op that does causal 1d convolution, as we would be able to avoid all the extra copying that's currently being done. But writing and maintaining the op might be a pain :/

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ibab/tensorflow-wavenet/issues/25#issuecomment-252111726, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCF5gay3mfBQ0wKyF2mamL0xFbu5kq9ks5qxX0mgaJpZM4J_k-r .

lemonzi avatar Oct 06 '16 23:10 lemonzi

@ibab I've made a pull request for mixed precision training https://github.com/ibab/tensorflow-wavenet/pull/384

and would like to encourage the authors and community to give it a try :)

vinhngx avatar Aug 16 '19 01:08 vinhngx