BIDData / BIDMat

A CPU and GPU-accelerated matrix library for data mining
BSD 3-Clause "New" or "Revised" License
265 stars 73 forks source link

Loading matrix directly to GPU #42

Closed kretes closed 8 years ago

kretes commented 9 years ago

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.

jcanny commented 8 years ago

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.