Skip to content

Multi-gpu processing on tch branch of Modkit #634

Description

@adbeggs

Hi team

Thanks for modkit. I'm using it to predict open-chromatin. The tch branch of it is indeed very fast on our HPC compared to the CPU only version - but the limitation is only one GPU can be specified instead of using all. For instance - I have a gpu node with 4 x A100 available presented as CUDA devices 0,1,2,3. It would be great if it could use all devices similar to dorado.

For others looking to set this up on a HPC to overcome a lot of GCC issues and torch and having to recompile I downloaded a suitable apptainer image by:

apptainer pull docker://nvidia/cuda:12.6.1-cudnn-runtime-ubuntu24.04

and then ran modkit within the apptainer image which solved a lot of the issues:

apptainer exec --nv --env LD_LIBRARY_PATH=/rds/homes/b/beggsa/beggsa-clinicalnanopore/software/modkit-gpu/libtorch/lib /rds/projects/b/beggsa-clinicalnanopore/software/modkit-gpu/cuda_12.6.1-cudnn-runtime-ubuntu24.04.sif bash -c '/rds/homes/b/beggsa/beggsa-clinicalnanopore/software/modkit-gpu/modkit open-chromatin predict germline_temp6mA.bam --model /rds/projects/b/beggsa-clinicalnanopore/software/modkit/models/r1041_e82_400bps_hac_v5.2.0\@v0.1.0/ --log modkit_predict.log -o ./accessible_regions.bedgraph --threshold 0.8 --device 0'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions