pLM-BLAST icon indicating copy to clipboard operation
pLM-BLAST copied to clipboard

add cuda support for `plmblast.py`

Open MiTRonGTE opened this issue 1 year ago • 0 comments

It seems that part of mathematical operations should be done on gpu - which may speed up the whole search.

This task will require to create a specific embedding loader for main loop. Which should

  • [ ] load embeddings directly into cuda device ( use map_location in torch.load)
  • [ ] calculate substitution matrix and optionally signal enh both on gpu
  • [ ] remove the need of concurrent/multiprocessing packages all multiprocessing routines should use torch.multiprocessing

Further main loop should work on cpu, (from this point: https://github.com/labstructbioinf/pLM-BLAST/blob/24c136d7443439afbadab9e0156af29861897644/alntools/base.py#L62 ) it will be the best to cpu and gpu based steps will be async so there will be on bottlenecks

For now I suggest to work on copy of scripts/plmblast.py for instance scripts/plmblastgpu.py

MiTRonGTE avatar Jan 05 '24 14:01 MiTRonGTE