提交 296293c8 authored 作者: carriepl's avatar carriepl

Merge pull request #3620 from nouiz/debugmode

[CRASH] Debugmode
...@@ -1939,10 +1939,7 @@ class _Linker(gof.link.LocalLinker): ...@@ -1939,10 +1939,7 @@ class _Linker(gof.link.LocalLinker):
if r not in fgraph.inputs] if r not in fgraph.inputs]
# Precompute some things for storage pre-allocation # Precompute some things for storage pre-allocation
try: def_val = int(config.unittests.rseed)
def_val = int(config.unittests.rseed)
except ValueError:
def_val = 666
##### #####
# This is the function that runs when you evaluate the graph # This is the function that runs when you evaluate the graph
......
...@@ -748,3 +748,20 @@ AddConfigVar( ...@@ -748,3 +748,20 @@ AddConfigVar(
"the first optimization, and could possibly still contains some bugs. " "the first optimization, and could possibly still contains some bugs. "
"Use at your own risks.", "Use at your own risks.",
BoolParam(False)) BoolParam(False))
def good_seed_param(seed):
if seed == "random":
return True
try:
int(seed)
except Exception:
return False
return True
AddConfigVar('unittests.rseed',
"Seed to use for randomized unit tests. "
"Special value 'random' means using a seed of None.",
StrParam(666, is_valid=good_seed_param),
in_c_key=False)
...@@ -244,6 +244,7 @@ if __name__ == "__main__": ...@@ -244,6 +244,7 @@ if __name__ == "__main__":
cuda version 7.5 7.0 6.5 cuda version 7.5 7.0 6.5
gpu gpu
k80 0.96s
K6000/NOECC 0.69s K6000/NOECC 0.69s
K40 0.88s K40 0.88s
K20m/ECC K20m/ECC
...@@ -257,7 +258,7 @@ if __name__ == "__main__": ...@@ -257,7 +258,7 @@ if __name__ == "__main__":
C1060 C1060
K600 K600
GTX Titan X 0.47s GTX Titan X 0.45s 0.47s
GTX Titan Black 0.64s GTX Titan Black 0.64s
GTX Titan(D15U-50) GTX Titan(D15U-50)
GTX 780 GTX 780
......
...@@ -18,7 +18,7 @@ import numpy ...@@ -18,7 +18,7 @@ import numpy
import theano import theano
import theano.tensor as T import theano.tensor as T
from theano.configparser import config, AddConfigVar, StrParam from theano.configparser import config
try: try:
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
except ImportError: except ImportError:
...@@ -29,22 +29,6 @@ except ImportError: ...@@ -29,22 +29,6 @@ except ImportError:
_logger = logging.getLogger("theano.tests.unittest_tools") _logger = logging.getLogger("theano.tests.unittest_tools")
def good_seed_param(seed):
if seed == "random":
return True
try:
int(seed)
except Exception:
return False
return True
AddConfigVar('unittests.rseed',
"Seed to use for randomized unit tests. "
"Special value 'random' means using a seed of None.",
StrParam(666, is_valid=good_seed_param),
in_c_key=False)
def fetch_seed(pseed=None): def fetch_seed(pseed=None):
""" """
Returns the seed to use for running the unit tests. Returns the seed to use for running the unit tests.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论