提交 43cc967e authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make it so that you can use some other device than 'opencl' or 'cuda'

上级 27a4b85f
......@@ -4,7 +4,7 @@ import subprocess
from theano.configparser import (
AddConfigVar, BoolParam, ConfigParam, DeviceParam, EnumStr, IntParam,
TheanoConfigParser)
StrParam, TheanoConfigParser)
from theano.misc.cpucount import cpuCount
from theano.misc.windows import call_subprocess_Popen
......@@ -53,6 +53,14 @@ AddConfigVar('device',
in_c_key=False,
)
AddConfigVar('gpuarray.init_device',
"""
Device to initialize for gpuarray use without moving
computations automatically.
""",
StrParam(''),
in_c_key=False)
AddConfigVar('init_gpu_device',
("Initialize the gpu device to use, works only if device=cpu. "
"Unlike 'device', setting this option will NOT move computations, "
......
import logging
import theano
from theano.configparser import config, AddConfigVar, StrParam, \
BoolParam, IntParam
from theano.configparser import config
from theano.compile import optdb
_logger_name = 'theano.sandbox.gpuarray'
......@@ -18,15 +17,6 @@ try:
except ImportError:
pygpu = None
AddConfigVar('gpuarray.init_device',
"""
Device to initialize for gpuarray use without moving
computations automatically.
""",
StrParam(''))
# This is for documentation not to depend on the availability of pygpu
from type import (GpuArrayType, GpuArrayVariable, GpuArrayConstant,
GpuArraySharedVariable, gpuarray_shared_constructor)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论