How can I transfer the data from GPU to HDD?

Hi There.

I’m tring to make a Codec for full HD video encoding using GPU.
I made a codec that has 50% lossless compression and 1,000 fps(frame per sec).

But, here is the problem.
The encoded result is in the GPU memory, and I need to move it to HDD.

In the case of full HD video, the size of a compressed frame is about 3MB.
And my codec can do 1,000 fps, so I think that there will be about 3GB I/O per second.

What do you recommend to me for transfering the encoded data from GPU to HDD?
Please let me know your opinion or suggestion.

Thanks.

I think you have to transfer it into RAM, then write it to the HDD. I don’t think you will be able to do it directly.

Thanks for your answer.

I know that I should transfer data from device to host, but as you know, it spends a lot of time to move data from device to host.

So I want to know if there are other ways to move data from device to host or directly local HDD.

If you have some ideas, please let me know.

There’s no way to transfer directly from GPU memory to hard disk without going through CPU memory (maybe we should put a SATA controller on the card!). The only advice I can think of is:

  1. use asynchronous transfers so that you can overlap the transfer of the previous frame with the computation of the next.
  2. use large transfers (batch frames together) to make best use of the bandwidth

Using mmaped host memory works pretty well if you want to just dump raw data from device memory to disk. For big data sets or more data structure complexity, I have been using pycuda with pytables to write through from device memory into hdf5 files.