项目文件夹

文件
VoVAllen cd907cddfa [Tutorial] Add sse tutorial & MXNet Tutorial CI (#252)
* add sse tutorial

* add mxnet tutorial ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* Fix ci

* Fix ci

* Fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* Fix CI

Fix CI image

* permission fix

* fix a bug in the code.

* small fix

* fix doc

* fix ci

* shorten the iters

* fix

* remove extra file

* add load_backend api to dynamically switch to another backend

* try fix

* fix tutorial

* fix tutorial

* fix bug in tutorial
2018-12-05 16:21:44 -05:00

38 行
681 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
pushd $GCN_EXAMPLE_DIR> /dev/null
# test
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