Pytorch-Memory-Utils icon indicating copy to clipboard operation
Pytorch-Memory-Utils copied to clipboard

Always show the first gpu?

Open liu09114 opened this issue 6 years ago • 1 comments

Multi-GPUs in some machine, how can make the program show the memory of other gpus? I have tested CUDA_VISIBLE_DEVICES, os.environ['VCUDA_VISIBLE_DEVICES'], but they didnot be effective.

liu09114 avatar Apr 22 '20 09:04 liu09114

After setting os.environ['CUDA_VISIBLE_DEVICES'] in your code, you should change gpu_tracker = MemTracker(frame) to: gpu_tracker = MemTracker(frame, device=int(os.getenv("CUDA_VISIBLE_DEVICES")))

yangwei-nlp avatar Oct 14 '20 09:10 yangwei-nlp