-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUDA error: an illegal memory access was encontered #13
Comments
Maybe custom op related error. Could let me know your GPUs, CUDA & pytorch version? Also, if you set CUDA_LAUNCH_BLOCKING=1 before run the train.py, then it will be easier to spot the location of the error. |
Thanks for your response. I fixed this error by add the code 'torch.cuda.set_device(1)', because i only want to run this code on the GPU 1. Before i just change " device = 'cuda' " to " device = 'cuda:1' ", and then found GPU 0 and GPU 1 both are used, so, i got the error above. Once again, thanks for your great work!! |
Glad to hear that the problem is resolved. By the way, wouldn't it be simpler to use CUDA_VISIBLE_DEVICES? |
I try "os.environ['CUDA_VISIBLE_DEVICES'] = '1' " first, but the error still appears. |
Thanks for your great work!
![image](https://user-images.githubusercontent.com/50037669/71775706-6dc3db80-2fc0-11ea-9488-824b9dc1030d.png)
When i run train.py at my dataset, i got this error. I got my dataset by
python prepare_data.py --out '/data/kmaeii/dataset/stylegan2/bag_texture_mdb' --n_worker 16 --size 128,256 '/data/kmaeii/dataset/stylegan2'
The text was updated successfully, but these errors were encountered: