提交 561064b3 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Use new attributes of config

上级 5aa9743f
...@@ -78,7 +78,7 @@ class GpuElemwise(Op): ...@@ -78,7 +78,7 @@ class GpuElemwise(Op):
# the amount of loading and storing to global memory that we would have to do. # the amount of loading and storing to global memory that we would have to do.
# That's why it isn't implemented yet. # That's why it isn't implemented yet.
# #
sync = config.config.getboolean('gpuelemwise.sync',sync) sync = config.gpuelemwise.sync
self.scalar_op = scalar_op self.scalar_op = scalar_op
if 0: if 0:
#we don't put them their as this cause trouble with the local_cut_gpu_host_gpu optimizer. #we don't put them their as this cause trouble with the local_cut_gpu_host_gpu optimizer.
......
...@@ -4,8 +4,7 @@ import sys, os, StringIO ...@@ -4,8 +4,7 @@ import sys, os, StringIO
import numpy import numpy
from theano import Op, Type, Apply, Variable, Constant from theano import Op, Type, Apply, Variable, Constant
from theano import tensor from theano import tensor, config
import theano.config as config
import cuda_ndarray.cuda_ndarray as cuda import cuda_ndarray.cuda_ndarray as cuda
import cuda_ndarray import cuda_ndarray
...@@ -240,14 +239,14 @@ class CudaNdarrayType(Type): ...@@ -240,14 +239,14 @@ class CudaNdarrayType(Type):
def c_header_dirs(self): def c_header_dirs(self):
"""Override `CLinkerOp.c_headers` """ """Override `CLinkerOp.c_headers` """
ret = [os.path.dirname(cuda_ndarray.__file__)] ret = [os.path.dirname(cuda_ndarray.__file__)]
cuda_root = config.CUDA_ROOT cuda_root = config.cuda.root
if cuda_root: if cuda_root:
ret.append(os.path.join(cuda_root,'include')) ret.append(os.path.join(cuda_root,'include'))
return ret return ret
def c_lib_dirs(self): def c_lib_dirs(self):
ret = [os.path.dirname(cuda_ndarray.__file__)] ret = [os.path.dirname(cuda_ndarray.__file__)]
cuda_root = config.CUDA_ROOT cuda_root = config.cuda.root
if cuda_root: if cuda_root:
ret.append(os.path.join(cuda_root,'lib')) ret.append(os.path.join(cuda_root,'lib'))
return ret return ret
...@@ -268,7 +267,7 @@ class CudaNdarrayType(Type): ...@@ -268,7 +267,7 @@ class CudaNdarrayType(Type):
def c_compile_args(self): def c_compile_args(self):
ret = [] ret = []
if config.config.getboolean('nvcc.fastmath'): if config.nvcc.fastmath:
ret.append('-use_fast_math') ret.append('-use_fast_math')
return ret return ret
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论