提交 cd37c765 authored 作者: Frederic's avatar Frederic

Allow to import theano.sandbox.cuda.basic_op on computer without GPU.

This is needed to allow generating the autodoc of this file.
上级 2e088f13
...@@ -13,15 +13,20 @@ scal = scalar # somewhere scalar gets reassigned to be a function ...@@ -13,15 +13,20 @@ scal = scalar # somewhere scalar gets reassigned to be a function
from theano.gof.python25 import all, any from theano.gof.python25 import all, any
from theano.sandbox.cuda import GpuOp, device_properties try:
# We must be able to import this file to create the full doc when nvcc
# is not available
from theano.sandbox.cuda import filter as type_support_filter
from theano.sandbox.cuda import device_properties
import cuda_ndarray
except ImportError:
pass
from theano.sandbox.cuda import GpuOp
from theano.sandbox.cuda.type import CudaNdarrayType from theano.sandbox.cuda.type import CudaNdarrayType
from theano.sandbox.cuda import filter as type_support_filter
from theano.sandbox.cuda.elemwise import NaiveAlgo from theano.sandbox.cuda.elemwise import NaiveAlgo
import cuda_ndarray
_logger_name = 'theano.sandbox.cuda.basic_ops' _logger_name = 'theano.sandbox.cuda.basic_ops'
_logger = logging.getLogger(_logger_name) _logger = logging.getLogger(_logger_name)
_logger.setLevel(logging.INFO) _logger.setLevel(logging.INFO)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论