#gpu mean let the driver select the gpu. Needed in case of gpu in exclusive mode.
#gpu mean let the driver select the gpu. Needed in case of gpu in exclusive mode.
#gpuX mean use the gpu number X.
#gpuX mean use the gpu number X.
AddConfigVar('device',
AddConfigVar('device',
"Default device for computations. If gpu, try to move computation to it when possible.",
"Default device for computations. If gpu*, change the default to try to move computation to it and to put shared variable of float32 on it.",
EnumStr('cpu','gpu',*['gpu%i'%iforiinrange(4)])
EnumStr('cpu','gpu',*['gpu%i'%iforiinrange(4)]),
allow_override=False
)
)
AddConfigVar('init_gpu_device',
AddConfigVar('init_gpu_device',
"Gpu device to use for computations, but don't automatically try to move the computation to this device. Usefull to run the test on a specific gpu.",
"Initialize the gpu device to use. This don't change the default behavior. We don't default to try to move the computation to it. We don't default to put shared variable of float32 on it. Usefull to run the test on a specific gpu.",
EnumStr('',*['gpu%i'%iforiinrange(4)])
EnumStr('',*['gpu%i'%iforiinrange(4)]),
allow_override=False
)
)
AddConfigVar('force_device',
AddConfigVar('force_device',
"Raise an error if we can't use the specified device",
"Raise an error if we can't use the specified device",
print"Will init the gpu to use a specific gpu device. This don't default tomove computation and allocate shared variable of float32 to this device. For that try the theano flags device."