Closed drozzy closed 3 years ago
You could check the GPU memory usage with nvidia-smi
. Or check if the data is a CuArray
.
It's showing up in nvidia-smi, but the actual training seems to be taking the same amount of time. My data-loaders are pretty slow though, since they read from disk... maybe that's the reason
Are your data loaders using DataLoaders.jl?
Yes. GPU: 1 epoch 1:51 CPU: 1 epoch 2:44
Oh yeah it was the file access. After I started caching stuff in memory: CPU (cached): 13s GPU (cached): 2s
Yeah I experienced this as well, but I didn't have time to investigate. Seems like we need DataLoaders.jl to play a little better with ToGPU
/CuIterator
.
How can I verify that the
ToGPU()
callback is working as expected?