SamStudio8 / warphog

travel hamming distances at warp speed
MIT License
0 stars 0 forks source link

Reduce full-load time for GPU block #3

Open SamStudio8 opened 3 years ago

SamStudio8 commented 3 years ago

CPU processing can be done on-the-fly as the sequences are iterated from the input file. The GPU however requires the data block to be present in memory before anything can be processed, making the GPU version slower than the CPU version for small sets of comparisons (not necessarily the worst thing).

Reducing I/O time for the GPU version could be accomplished by either a cleverer file reading mechanism, or by reducing the data block size and cooking up a means to efficiently read smaller blocks and swap them in and out of the GPU.

SamStudio8 commented 3 years ago

Committed some broken thoughts on this to https://github.com/SamStudio8/warphog/tree/3-speedio

SamStudio8 commented 3 years ago

I did wonder if numpy had anything that could help, I note this works but takes longer than the current method np.genfromtxt("aln.fasta", dtype=str, comments='>').view(dtype=np.uint32).astype(np.int8, copy=False)