12/06/2019

using specific gpu device for TensorFlow

setting first or second gpu machine
CUDA_VISIBLE_DEVICES=0 python script_one.py
CUDA_VISIBLE_DEVICES=1 python script_two.py
another way
use first (it didn't work for me)
export CUDA_VISIBLE_DEVICE=0
./train.py
use second (it didn't work for me)
export CUDA_VISIBLE_DEVICE=1
./train.py
use both (it didn't work for me)
export CUDA_VISIBLE_DEVICE=0,1
./train.py

refer to here:
https://stackoverflow.com/questions/44135538/tensorflow-using-2-gpu-at-the-same-time

No comments:

Post a Comment