提交 aaa1c7e7 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3718 from Erotemic/enable_driver_test_config

Added config variable to disable initial testing of nvidia drivers
......@@ -174,6 +174,14 @@ import theano and print the config variable, as in:
Print active device at when the GPU device is initialized.
.. attribute:: enable_initial_driver_test
Bool value: either ``True`` or ``False``
Default: ``True``
Tests the nvidia driver when a GPU device is initialized.
.. attribute:: floatX
String value: either 'float64' or 'float32'
......
......@@ -107,6 +107,7 @@ if config.device.startswith('gpu') or config.init_gpu_device.startswith('gpu'):
if theano.sandbox.cuda.cuda_available:
import theano.sandbox.cuda.tests.test_driver
if config.enable_initial_driver_test:
theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
if (config.device.startswith('cuda') or
......
......@@ -146,6 +146,13 @@ AddConfigVar(
in_c_key=False)
AddConfigVar(
'enable_initial_driver_test',
"Tests the nvidia driver when a GPU device is initialized.",
BoolParam(True, allow_override=False),
in_c_key=False)
def default_cuda_root():
v = os.getenv('CUDA_ROOT', "")
if v:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论