fxia22 / kdnet.pytorch

implementation "Escape from Cells: Deep Kd-Networks for The Recognition of 3D Point Cloud Models" in pytorch
https://arxiv.org/abs/1704.01222
MIT License
117 stars 23 forks source link

How to explicity specify GPU# on code #7

Closed saira05 closed 6 years ago

saira05 commented 6 years ago

Hi, Your code is implemented in pytorch, i installed pytorch 0.4.0 on my account on server but server have 2 gpus and this code is by default select gpu0, which is already taken by another process can you tell me how can i specify in code then it will chose gpu 0 or 1 which is free at that time i am new to pytorch so having little trouble on this issue

thanx

fxia22 commented 6 years ago

Currently the code doesn't support multi GPUs so it will use the first visible GPU by default. You can select which GPU to use by setting CUDA_VISIBLE_DEVICES. For example if you run CUDA_VISIBLE_DEVICES=0 python train.py it will use GPU 0; if you run CUDA_VISIBLE_DEVICES=1 python train.py it will use GPU 1.

saira05 commented 6 years ago

thanks alot