DMA between CPU and GPU in TensorFlow
Asked Answered
S

0

6

I am running TensorFlow on NVidia Jetson TX1 and faced memory shortage when I train large network such as GoogleNet.

CPU and GPU in TX1 do not have separate memory and they share one memory. However, It seems that TensorFlow is trying to allocate separate memory space and copy from CPU side to GPU side. Thus it requests 2x memory than it really needs.

In my opinion, this situation can be handled by something like DMA access between CPU and GPU. As far as I know, TensorFlow utilizes DMA between GPUs (not sure which one handles this. TensorFlow? or GPU driver?). Can I use DMA between CPU and GPU also in TensorFlow? or any other suggestions?

EDIT: I just found that there is Zero Copy feature in CUDA which is what I exactly wanted. However, can I use this feature in TensorFlow?

Southbound answered 28/2, 2017 at 17:55 Comment(2)
Might be worth filing a feature request, I'm not aware of TensorFlow supporting CPU->GPU DMATuinenga
not worth an answer but a guide into this direction: tensorflow.org/performance/performance_guide#optimizing_for_gpuGeelong

© 2022 - 2024 — McMap. All rights reserved.