Multi GPU training error
See original GitHub issueHi while using multiple GPUs for training I get this:
File "/workspace/TResNet/src/models/tresnet/layers/anti_aliasing.py", line 40, in __call__
return F.conv2d(input_pad, self.filt, stride=2, padding=0, groups=input.shape[1])
RuntimeError: Assertion `THCTensor_(checkGPU)(state, 3, input, output, weight)' failed. Some of weight/gradient/input tensors are located on different GPUs. Please move them to a single one. at /tmp/pip-r
eq-build-cms73_uj/aten/src/THCUNN/generic/SpatialDepthwiseConvolution.cu:19
However single GPU training using CUDA_VISIBLE_DEVICES=0
before my training script works fine. I can see the losses going down after iterations.
Can you help with this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Multi-GPU Training error #2461 - ultralytics/yolov5 - GitHub
Multi-GPU Training: python -m torch.distributed.launch --master_port 42342 ... I got the error: Tensors must be CUDA and dense When I set ...
Read more >Multi GPU training Error e - NVIDIA Developer Forums
I am using 8 gpus for training and randomly I get this error after some number of epochs: [2020-08-03 11:25:36.480844: W ...
Read more >Problems with multi-gpus - MATLAB Answers - MathWorks
Learn more about multi gpus. ... no problem training with a single gpu, but when I try to train with multiple gpus, matlab...
Read more >Multi-GPU training crashes after some time due to NVLink ...
I want to train my model on a dual GPU set-up using Trainer(gpus=2, strategy='ddp'). To my understanding, Lightning sets up Distributed ...
Read more >Multi-GPU Training - YOLOv5 Documentation
You can increase the device to use Multiple GPUs in DataParallel mode. ... This method is slow and barely speeds up training compared...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i added an option --remove_aa_jit. run with it, it should be ok for you.
As i said before, TResNet fully supports multi-GPUs, i trained on imagenet with 8xV100. your script is not well designed in terms of distributed. models should be defined after(!) you do ‘torch.cuda.set_device(rank)’, not before. if you insist on the opposite way, use the --remove_aa_jit flag.
i also added some general tips section for working with inplace-abn: https://github.com/mrT23/TResNet/blob/master/INPLACE_ABN_TIPS.md
all the best
I got this:
I also tried modifying the non-JIT Downsample to account for RANK, but that gave me the same originial error:
Some of weight/gradient/input tensors are located on different GPUs. Please move them to a single one. at /tmp/pip-r eq-build-cms73_uj/aten/src/THCUNN/generic/SpatialDepthwiseConvolution.cu:19
Do you have some suggestions to make a custom grad function to account for multi-GPUs?