Hi,Thank you for the code. I want to run snn.py on multiple GPUs, but when I use model=nn.DataParallel(model), the following error occurs. How can I solve it?
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
File "D:\0_WorkSpaces\Anaconda3\envs\pytorch04-gpu-ql\lib\site-packages\torch\nn\parallel\parallel_apply.py", line 60, in _worker
output = module(*input, *kwargs)
File "D:\0_WorkSpaces\Anaconda3\envs\pytorch04-gpu-ql\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(input, **kwargs)
File "E:\GZY\SNN\新建文件夹\hybrid-snn-conversion-master\self_models\vgg_spiking.py", line 255, in forward
self.spike[l] = self.spike[l].masked_fill(out.bool(),t-1)
RuntimeError: arguments are located on different GPUs at C:/w/b/windows/pytorch/aten/src\THC/generic/THCTensorMasked.cu:27
Hi,Thank you for the code. I want to run snn.py on multiple GPUs, but when I use model=nn.DataParallel(model), the following error occurs. How can I solve it?
RuntimeError: Caught RuntimeError in replica 0 on device 0. Original Traceback (most recent call last): File "D:\0_WorkSpaces\Anaconda3\envs\pytorch04-gpu-ql\lib\site-packages\torch\nn\parallel\parallel_apply.py", line 60, in _worker output = module(*input, *kwargs) File "D:\0_WorkSpaces\Anaconda3\envs\pytorch04-gpu-ql\lib\site-packages\torch\nn\modules\module.py", line 550, in call result = self.forward(input, **kwargs) File "E:\GZY\SNN\新建文件夹\hybrid-snn-conversion-master\self_models\vgg_spiking.py", line 255, in forward self.spike[l] = self.spike[l].masked_fill(out.bool(),t-1) RuntimeError: arguments are located on different GPUs at C:/w/b/windows/pytorch/aten/src\THC/generic/THCTensorMasked.cu:27