Accessing the files on the hard drive from the GPU

Is it possible to access the files on the hard drive from the GPU without using the CPU?
If yes, does it take more or less time than the time a CPU needs to access and read a text file?

I don’t think so. Stream would go from: Disk -> CPU memory -> GPU memory

But the asynchronous transfers would allow you to minimize the impact of the transfer times and likely you could figure out a way to make the proportion of transfer time irrelevant relative to the time to compute.

In theory, if you have a GPU with support of unified memory addressing (Tesla or Quadro), you can create a buffer in video memory and use an OS call such as ReadFile with the buffer as destination, that should have the effect of reading information from the file and sending it directly to the GPU.

Has anyone tried this to see if it works? How about with mmapped memory?

pretty sure you can’t mmap a file and then pin those pages, which is what cudaHostRegister requires.

Even if you could, the OS would have to load the entire file into the system memory before it could pin the pages.

This is the difference between push and pull approach. Memory-mapping is “pull”. Your code tries to read the memory-mapped region. Accesses in the region that has not yet been read from the file trigger page faults, which are handled by the virtual memory manager, pulling data from the file.

Instead, we want to “push” data from the drive to the GPU. Map a region of video memory into the global address space and request the hard drive to initiate a DMA into that region, through the PCIe bus but bypassing system memory.

GTC isn’t that far away. Maybe we will have some things to talk about then.

I think there was some kind of misunderstanding, but I’m not sure what or why.

He did it again…
Given Tim’s track record, I don’t think there was a misunderstanding on his part. ;)