提交 32c235a0 authored 作者: slefrancois's avatar slefrancois

added comments to scripts

上级 35af492b
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
source ~/.bashrc source ~/.bashrc
# Test flake8 # Test flake8
echo "===== Testing flake8"
bin/theano-nose theano/tests/test_flake8.py bin/theano-nose theano/tests/test_flake8.py
# Test documentation # Test documentation
echo "===== Testing documentation"
python doc/scripts/docgen.py --nopdf --check python doc/scripts/docgen.py --nopdf --check
python doc/scripts/docgen.py --test --check python doc/scripts/docgen.py --test --check
#!/bin/bash #!/bin/bash
# Script for Jenkins continuous integration testing of gpuarray backend # Script for Jenkins continuous integration testing of theano base and old backend
echo "===== Testing theano base"
# Get environment from worker, necessary for CUDA # Get environment from worker, necessary for CUDA
source ~/.bashrc source ~/.bashrc
GPUARRAY_CONFIG="Release" # Test theano CPU and old GPU backend sandbox.cuda
DEVICE=cuda0 THEANO_PARAM="theano --with-timer --timer-top-n 10"
LIBDIR=~/tmp/local FLAGS="mode=FAST_RUN,init_gpu_device=gpu"
THEANO_FLAGS=${FLAGS} bin/theano-nose ${THEANO_PARAM}
# 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 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib64/
export LIBRARY_PATH=$LIBRARY_PATH:$LIBDIR/lib64/
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 && python 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 && python setup.py install --home=$LIBDIR)
# Test libgpuarray and pygpu
#(cd libgpuarray/build && DEVICE=$DEVICE make test)
#DEVICE=$DEVICE python -c "import pygpu;pygpu.test()"
# Testing theano (the gpuarray parts)
THEANO_GPUARRAY_TESTS="theano/gpuarray/tests theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_serial theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_parallel theano/scan_module/tests/test_scan.py:T_Scan_Gpuarray"
FLAGS="init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN"
THEANO_FLAGS=${FLAGS} time nosetests -v ${THEANO_GPUARRAY_TESTS}
#!/bin/bash #!/bin/bash
# Script for Jenkins continuous integration testing of theano base and old backend # Script for Jenkins continuous integration testing of gpuarray backend
echo "===== Testing gpuarray backend"
# Get environment from worker, necessary for CUDA # Get environment from worker, necessary for CUDA
source ~/.bashrc source ~/.bashrc
# Test theano CPU and old GPU backend sandbox.cuda GPUARRAY_CONFIG="Release"
THEANO_PARAM="theano --with-timer --timer-top-n 10" DEVICE=cuda0
FLAGS="mode=FAST_RUN,init_gpu_device=gpu" LIBDIR=~/tmp/local
THEANO_FLAGS=${FLAGS} bin/theano-nose ${THEANO_PARAM}
# 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 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR/lib64/
export LIBRARY_PATH=$LIBRARY_PATH:$LIBDIR/lib64/
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 && python 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 && python setup.py install --home=$LIBDIR)
# Test libgpuarray and pygpu
#(cd libgpuarray/build && DEVICE=$DEVICE make test)
#DEVICE=$DEVICE python -c "import pygpu;pygpu.test()"
# Testing theano (the gpuarray parts)
THEANO_GPUARRAY_TESTS="theano/gpuarray/tests theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_serial theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_parallel theano/scan_module/tests/test_scan.py:T_Scan_Gpuarray"
FLAGS="init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN"
THEANO_FLAGS=${FLAGS} time nosetests -v ${THEANO_GPUARRAY_TESTS}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论