提交 4534571b authored 作者: abergeron's avatar abergeron

Merge pull request #1850 from nouiz/check_blas

Add flag cmodule.preload_cache and gpu timming
...@@ -699,3 +699,9 @@ import theano and print the config variable, as in: ...@@ -699,3 +699,9 @@ import theano and print the config variable, as in:
Bool value, default: False Bool value, default: False
If True, will print compilation warnings. If True, will print compilation warnings.
.. attribute:: cmodule.preload_cache'
Bool value, default: False
If set to True, will preload the C module cache at import time
...@@ -81,3 +81,8 @@ from theano.gof.type import \ ...@@ -81,3 +81,8 @@ from theano.gof.type import \
from theano.gof.utils import \ from theano.gof.utils import \
hashtype, object2, MethodNotDefined hashtype, object2, MethodNotDefined
import theano
if theano.config.cmodule.preload_cache:
cc.get_module_cache()
...@@ -62,6 +62,11 @@ AddConfigVar('cmodule.compilation_warning', ...@@ -62,6 +62,11 @@ AddConfigVar('cmodule.compilation_warning',
BoolParam(False)) BoolParam(False))
AddConfigVar('cmodule.preload_cache',
"If set to True, will preload the C module cache at import time",
BoolParam(False, allow_override=False),
in_c_key=False)
_logger = logging.getLogger("theano.gof.cmodule") _logger = logging.getLogger("theano.gof.cmodule")
_logger.setLevel(logging.WARNING) _logger.setLevel(logging.WARNING)
......
...@@ -12,7 +12,8 @@ def filter_output(fd_in): ...@@ -12,7 +12,8 @@ def filter_output(fd_in):
elif toks[0].startswith("ImportError"): elif toks[0].startswith("ImportError"):
s += line s += line
elif toks[0] in ["KnownFailureTest:", "Exception:", "Failure:", elif toks[0] in ["KnownFailureTest:", "Exception:", "Failure:",
"AssertionError", "AssertionError:"]: "AssertionError", "AssertionError:",
"GradientError:"]:
s += line s += line
elif toks[0] == "Executing" and toks[1] in ["tests", 'nosetests']: elif toks[0] == "Executing" and toks[1] in ["tests", 'nosetests']:
s += line s += line
......
...@@ -201,36 +201,38 @@ if __name__ == "__main__": ...@@ -201,36 +201,38 @@ if __name__ == "__main__":
Test time in float32 Test time in float32
cuda version 5.5 5.0 4.2 4.1 4.0 3.2 3.0 # note cuda version 6.0 5.5 5.0 4.2 4.1 4.0 3.2 3.0 # note
gpu gpu
K6000/NOECC 0.06s K6000/NOECC 0.06s
K20m/ECC 0.07s K20m/ECC 0.07s
K20/NOECC 0.07s K20/NOECC 0.07s
M2090 0.19s M2090 0.19s
C2075 0.25s C2075 0.25s
M2075 0.25s M2075 0.25s
M2070 0.25s 0.27s 0.32s M2070 0.25s 0.27s 0.32s
M2070-Q 0.48s 0.27s 0.32s M2070-Q 0.48s 0.27s 0.32s
M2050(Amazon) 0.25s M2050(Amazon) 0.25s
C1060 0.46s C1060 0.46s
GTX Titan(D15U-50)0.06s 0.06s don't work GTX Titan Black 0.05s
GTX 680 0.11s 0.12s 0.154s 0.218s GTX Titan(D15U-50) 0.06s 0.06s don't work
GTX 580 0.16s 0.16s 0.164s 0.203s GTX 680 0.11s 0.12s 0.154s 0.218s
GTX 480 0.19s 0.19s 0.192s 0.237s 0.27s GTX 580 0.16s 0.16s 0.164s 0.203s
GTX 470 0.23s 0.23s 0.238s 0.297s 0.34s GTX 480 0.19s 0.19s 0.192s 0.237s 0.27s
GTX 660 0.18s 0.20s 0.23s GTX 470 0.23s 0.23s 0.238s 0.297s 0.34s
GTX 560 0.30s GTX 660 0.18s 0.20s 0.23s
GTX 650 Ti 0.27s GTX 560 0.30s
GTX 460 0.37s 0.45s GTX 650 Ti 0.27s
GTX 285 0.42s 0.452s 0.452s 0.40s # cuda 3.0 seems faster? driver version? GTX 460 0.37s 0.45s
750M 0.49s GTX 285 0.42s 0.452s 0.452s 0.40s # cuda 3.0 seems faster? driver version?
GTX 550 Ti 0.57s 750M 0.49s
GT 520 2.68s 3.06s GTX 550 Ti 0.57s
520M 2.44s 3.19s # with bumblebee on Ubuntu 12.04 GTX 765M 1.2s
GT 220 3.80s GT 520 2.68s 3.06s
GT 210 6.35s 520M 2.44s 3.19s # with bumblebee on Ubuntu 12.04
8500 GT 10.68s GT 220 3.80s
GT 210 6.35s
8500 GT 10.68s
""" """
t, impl = execute(not options.print_only, not options.quiet, t, impl = execute(not options.print_only, not options.quiet,
......
#!/bin/bash #!/bin/bash
date date
START=`date +%s` START=`date +%s`
ARGS=$@ ARGS="$@"
PROFILING="" PROFILING=""
RELEASE="" RELEASE=""
if [ "$1" == "--release" ]; then if [ "$1" == "--release" ]; then
RELEASE="True" RELEASE="True"
shift shift
ARGS=$@ ARGS="$@"
fi fi
if [ "$1" == "--buildbot" ]; then if [ "$1" == "--buildbot" ]; then
shift
ARGS="$@"
#we set the compiledir to the /Tmp dir to make the test faster by bypassing the nfs network. #we set the compiledir to the /Tmp dir to make the test faster by bypassing the nfs network.
COMPILEDIR=/Tmp/lisa_theano_compile_dir_theano COMPILEDIR=/Tmp/lisa_theano_compile_dir_theano
ROOT_CWD=/Tmp/nightly_build ROOT_CWD=/Tmp/nightly_build
...@@ -19,7 +21,6 @@ if [ "$1" == "--buildbot" ]; then ...@@ -19,7 +21,6 @@ if [ "$1" == "--buildbot" ]; then
cd ${ROOT_CWD}/Theano cd ${ROOT_CWD}/Theano
git rev-parse HEAD git rev-parse HEAD
#Run tests from inside the Theano directory to prevent import problem. #Run tests from inside the Theano directory to prevent import problem.
ARGS=""
PROFILING="--with-coverage --cover-package=theano" PROFILING="--with-coverage --cover-package=theano"
NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose
export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论