提交 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,7 +201,7 @@ if __name__ == "__main__": ...@@ -201,7 +201,7 @@ 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
...@@ -214,7 +214,8 @@ if __name__ == "__main__": ...@@ -214,7 +214,8 @@ if __name__ == "__main__":
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 Titan(D15U-50) 0.06s 0.06s don't work
GTX 680 0.11s 0.12s 0.154s 0.218s GTX 680 0.11s 0.12s 0.154s 0.218s
GTX 580 0.16s 0.16s 0.164s 0.203s GTX 580 0.16s 0.16s 0.164s 0.203s
GTX 480 0.19s 0.19s 0.192s 0.237s 0.27s GTX 480 0.19s 0.19s 0.192s 0.237s 0.27s
...@@ -226,6 +227,7 @@ if __name__ == "__main__": ...@@ -226,6 +227,7 @@ if __name__ == "__main__":
GTX 285 0.42s 0.452s 0.452s 0.40s # cuda 3.0 seems faster? driver version? GTX 285 0.42s 0.452s 0.452s 0.40s # cuda 3.0 seems faster? driver version?
750M 0.49s 750M 0.49s
GTX 550 Ti 0.57s GTX 550 Ti 0.57s
GTX 765M 1.2s
GT 520 2.68s 3.06s GT 520 2.68s 3.06s
520M 2.44s 3.19s # with bumblebee on Ubuntu 12.04 520M 2.44s 3.19s # with bumblebee on Ubuntu 12.04
GT 220 3.80s GT 220 3.80s
......
#!/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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论