labstructbioinf/pLM-BLAST

add cuda support for `plmblast.py`

Opened this issue · 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:

def submatrix_to_span(self, densitymap, mode: str = 'results') -> pd.DataFrame:
) 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