Skip to content

Questions about multi-GPU training #16

Description

@ranpin

Hi, When I use your code for training, for example prune_distill_step1.py, I use the command CUDA_VISIBLE_DEVICES=0,1 python prune_distill_step1.py --traindata_path < train_data_root> --valdata_path <val_data_root> --prune_ratio <pruning ratio> --epochs <training epochs>.

I didn't change the content of the code in the file(python prune_distill_step1.py), except for setting batchsize=8. However, I found the following picture, and I didn't succeed in training with multiple GPU cards. And it will report insufficient GPU memory. But I did find the part of your code where you write about using multiple GPUs for parallel training likes
model.image_encoder = torch.nn.DataParallel(model.image_encoder) .

Is there a possible problem with the code or am I missing some setting? How should I approach multi-GPU training? Looking forward to your reply, thank you very much!

image

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions