BIDData/BIDMat

Loading matrix directly to GPU

Closed this issue · 1 comments

We want to load matrix from file/stream to GPU. currently we load the whole to FMat and then copy to GPU but maybe it would be faster to do it directly to GPU.

could you point us how to do it directly on GPU?
Currently i do not see a way to either update a given cell in GMat or maybe update whole row/col in GMat.

Files Datasources already prefetch data off disk into memory before it gets passed to the GPU in blocks by the learner classes. This arrangement can keep up with disk I/O and has run up to about 2 GB/s from a RAID. There isnt really any way to make it faster. If you can use that infrastructure, you'll reach the full speed of the disk. If you want very low-latency rather than throughput, you could store the data in many small files (e.g. 10 MB or so).

You can update colums of GMats with either a(?,irange) =... or the colslice method. Those updates are fast. slicing rows is inefficient because the matrices are column-major.