提交 b60891b6 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Get rid of references to the older THEANO_* environment variables in the code…

Get rid of references to the older THEANO_* environment variables in the code comments and inline doc.
上级 78131b18
...@@ -221,12 +221,8 @@ predefined_modes = {'FAST_COMPILE': FAST_COMPILE, ...@@ -221,12 +221,8 @@ predefined_modes = {'FAST_COMPILE': FAST_COMPILE,
'SANITY_CHECK': SANITY_CHECK} 'SANITY_CHECK': SANITY_CHECK}
## # The default mode used by functions and modules is read from the configuration.
# The default mode used by functions and modules is read from the environment
# variable THEANO_DEFAULT_MODE. Unit tests will run using this value. If the env. var.
# is not set, it will default to 'FAST_RUN'
# keep default_mode.optimizer==default_optimizer and default_mode.linker==default_linker! # keep default_mode.optimizer==default_optimizer and default_mode.linker==default_linker!
##
default_mode = config.mode default_mode = config.mode
def get_mode(string): def get_mode(string):
......
...@@ -312,10 +312,10 @@ class ProfileMode(Mode): ...@@ -312,10 +312,10 @@ class ProfileMode(Mode):
register_mode('PROFILE_MODE',ProfileMode()) register_mode('PROFILE_MODE',ProfileMode())
def atexit_print_default_profile_mode(): def atexit_print_default_profile_mode():
"""Print the summary of the predefied mode PROFILE_MODE if used. """Print the summary of the predefined mode PROFILE_MODE if used.
This all to have the summary printed at exit when we do This all to have the summary printed at exit when
THEANO_DEFAULT_MODE=PROFILE_MODE config.mode=PROFILE_MODE
""" """
prof_mode=predefined_modes["PROFILE_MODE"] prof_mode=predefined_modes["PROFILE_MODE"]
if prof_mode.local_time[0]>0: if prof_mode.local_time[0]>0:
......
...@@ -261,11 +261,14 @@ def _wrap_tensor_into_member(x): ...@@ -261,11 +261,14 @@ def _wrap_tensor_into_member(x):
compile.module.register_wrapper(_obj_is_wrappable_as_tensor, _wrap_tensor_into_member) compile.module.register_wrapper(_obj_is_wrappable_as_tensor, _wrap_tensor_into_member)
if int(config.tensor.cmp_sloppy)>1: if int(config.tensor.cmp_sloppy)>1:
# This environment variable is a quick-and-dirty way to get low-precision comparisons. # This config variable is a quick-and-dirty way to get low-precision
# For a more precise setting of these tolerances set them explicitly in your user code by # comparisons. For a more precise setting of these tolerances set
# assigning, for example, "theano.tensor.basic.float32_atol = ..." # them explicitly in your user code by assigning, for example,
# "theano.tensor.basic.float32_atol = ..."
#when THEANO_CMP_SLOPPY>1 we are even more sloppy. This is usefull to test the gpu as they don't use extended precision and this cause some difference bigger then the normal sloppy.
# When config.tensor.cmp_sloppy>1 we are even more sloppy. This is
# useful to test the GPU as they don't use extended precision and
# this cause some difference bigger then the normal sloppy.
float32_atol = 5e-4 float32_atol = 5e-4
float32_rtol = 1e-3 float32_rtol = 1e-3
float64_rtol = 1e-4 float64_rtol = 1e-4
......
...@@ -44,7 +44,7 @@ def ldflags(libs=True, flags=False): ...@@ -44,7 +44,7 @@ def ldflags(libs=True, flags=False):
"""Return a list of libraries against which an Op's object file should be """Return a list of libraries against which an Op's object file should be
linked to benefit from a BLAS implementation. linked to benefit from a BLAS implementation.
Default: ['blas'], but environment variable THEANO_BLAS_LDFLAGS overrides this. Default: ['blas'], but configuration variable config.blas.ldflags overrides this.
""" """
rval = [] rval = []
for t in config.blas.ldflags.split(): for t in config.blas.ldflags.split():
...@@ -52,9 +52,9 @@ def ldflags(libs=True, flags=False): ...@@ -52,9 +52,9 @@ def ldflags(libs=True, flags=False):
t0, t1, t2 = t[0:3] t0, t1, t2 = t[0:3]
assert t0 == '-' assert t0 == '-'
except: except:
raise ValueError('invalid token in THEANO_BLAS_LDFLAGS', t) raise ValueError('invalid token in config.blas.ldflags', t)
if t1 == 'L': if t1 == 'L':
raise ValueError('library dir not allowed in THEANO_BLAS_LDFLAGS', t) raise ValueError('library dir not allowed in config.blas.ldflags', t)
elif libs and t1=='l': # example -lmkl elif libs and t1=='l': # example -lmkl
rval.append(t[2:]) rval.append(t[2:])
elif flags and t1!='l': # example -openmp elif flags and t1!='l': # example -openmp
......
...@@ -34,7 +34,7 @@ def fetch_seed(pseed=None): ...@@ -34,7 +34,7 @@ def fetch_seed(pseed=None):
#backport #backport
#seed = int(seed) if seed else None #seed = int(seed) if seed else None
except ValueError: except ValueError:
print >> sys.stderr, 'Error: THEANO_UNITTEST_SEED contains '\ print >> sys.stderr, 'Error: config.unittests.rseed contains '\
'invalid seed, using None instead' 'invalid seed, using None instead'
seed = None seed = None
...@@ -48,7 +48,7 @@ def seed_rng(pseed=None): ...@@ -48,7 +48,7 @@ def seed_rng(pseed=None):
seed = fetch_seed(pseed) seed = fetch_seed(pseed)
if pseed and pseed!=seed: if pseed and pseed!=seed:
print >> sys.stderr, 'Warning: using seed given by THEANO_UNITTEST_SEED=%i'\ print >> sys.stderr, 'Warning: using seed given by config.unittests.rseed=%i'\
'instead of seed %i given as parameter' % (seed, pseed) 'instead of seed %i given as parameter' % (seed, pseed)
numpy.random.seed(seed) numpy.random.seed(seed)
return seed return seed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论