提交 5bc1fa04 authored 作者: Simon Lefrancois's avatar Simon Lefrancois

add fast_run and gpu to python3 buildbot

上级 b6b5f4d1
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
BUILDBOT_DIR=$WORKSPACE/nightly_build BUILDBOT_DIR=$WORKSPACE/nightly_build
THEANO_PARAM="theano --with-timer --timer-top-n 10" THEANO_PARAM="theano --with-timer --timer-top-n 10"
COMPILEDIR=$HOME/.theano/buildbot_theano_python3
# Set test reports using nosetests xunit # Set test reports using nosetests xunit
XUNIT="--with-xunit --xunit-file=" XUNIT="--with-xunit --xunit-file="
SUITE="--xunit-testsuite-name="
export THEANO_FLAGS=init_gpu_device=cuda export THEANO_FLAGS=init_gpu_device=cuda
# CUDA # CUDA
...@@ -12,12 +15,55 @@ export CPATH=/usr/local/cuda/include/:$CPATH ...@@ -12,12 +15,55 @@ export CPATH=/usr/local/cuda/include/:$CPATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH
# Build libgpuarray
GPUARRAY_CONFIG="Release"
DEVICE=cuda
LIBDIR=${WORKSPACE}/local
# Make fresh clones of libgpuarray (with no history since we don't need it)
rm -rf libgpuarray
git clone --depth 1 "https://github.com/Theano/libgpuarray.git"
# Clean up previous installs (to make sure no old files are left)
rm -rf $LIBDIR
mkdir $LIBDIR
# Build libgpuarray
mkdir libgpuarray/build
(cd libgpuarray/build && cmake .. -DCMAKE_BUILD_TYPE=${GPUARRAY_CONFIG} -DCMAKE_INSTALL_PREFIX=$LIBDIR && make)
# Finally install
(cd libgpuarray/build && make install)
# Export paths
export CPATH=$CPATH:$LIBDIR/include
export LIBRARY_PATH=$LIBRARY_PATH:$LIBDIR/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib
# Build the pygpu modules
(cd libgpuarray && python3 setup.py build_ext --inplace -I$LIBDIR/include -L$LIBDIR/lib)
ls $LIBDIR
mkdir $LIBDIR/lib/python
export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python
# Then install
(cd libgpuarray && python3 setup.py install --home=$LIBDIR)
python3 -c 'import pygpu; print(pygpu.__file__)'
mkdir -p ${BUILDBOT_DIR} mkdir -p ${BUILDBOT_DIR}
ls -l ${BUILDBOT_DIR} ls -l ${BUILDBOT_DIR}
echo "Directory of stdout/stderr ${BUILDBOT_DIR}" echo "Directory of stdout/stderr ${BUILDBOT_DIR}"
echo echo
echo echo
FILE=${BUILDBOT_DIR}/theano_python3_tests.xml
set -x set -x
PYTHONPATH= THEANO_FLAGS=$THEANO_FLAGS,compiledir=$HOME/.theano/buildbot_theano_python3,mode=FAST_COMPILE,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,magma.enabled=true python3 bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE}
# Fast compile and float64
FILE=${BUILDBOT_DIR}/theano_python3_fastcompile_f64_tests.xml
NAME=fastcompile_f64
THEANO_FLAGS=$THEANO_FLAGS,compiledir=$COMPILEDIR,mode=FAST_COMPILE,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,magma.enabled=true,floatX=float64 python3 bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}
# Fast run and float32
FILE=${BUILDBOT_DIR}/theano_python3_fastrun_f32_tests.xml
NAME=fastrun_f32
THEANO_FLAGS=$THEANO_FLAGS,compiledir=$COMPILEDIR,mode=FAST_RUN,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,magma.enabled=true,floatX=float32 python3 bin/theano-nose ${THEANO_PARAM} ${XUNIT}${FILE} ${SUITE}${NAME}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论