项目文件夹

文件
Minjie Wang 5492994251 [CI] Fix CI bugs (#592)
* new jenkins script

* fix ci

* poke ci

* new config

* new config

* new config

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* update docker image; poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* poke ci

* update image

* update image

* fix

* Windows CI support

* typo

* typo*2

* missed sh

* typo*3

* missed dir
2019-06-01 14:32:39 -04:00

44 行
817 B
Bash

#!/bin/bash
GCN_EXAMPLE_DIR="./examples/pytorch/"
function fail {
echo FAIL: $@
exit -1
}
function usage {
echo "Usage: $0 [cpu|gpu]"
}
# check arguments
if [ $# -ne 1 ]; then
usage
fail "Error: must specify device"
fi
if [ "$1" == "cpu" ]; then
dev=-1
elif [ "$1" == "gpu" ]; then
export CUDA_VISIBLE_DEVICES=0
dev=0
else
usage
fail "Unknown device $1"
fi
export DGLBACKEND=pytorch
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=${PWD}/python:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}
# test
pushd $GCN_EXAMPLE_DIR> /dev/null
python3 pagerank.py || fail "run pagerank.py on $1"
python3 gcn/gcn.py --dataset cora --gpu $dev || fail "run gcn/gcn.py on $1"
python3 gcn/gcn_spmv.py --dataset cora --gpu $dev || fail "run gcn/gcn_spmv.py on $1"
popd > /dev/null