task_example_test.bat 711 Bytes
Newer Older
1
2
3
@ECHO OFF
SETLOCAL EnableDelayedExpansion

Minjie Wang's avatar
Minjie Wang committed
4
5
SET GCN_EXAMPLE_DIR=.\examples\pytorch

6
7
8
IF x%1x==xx (
	ECHO Must supply CPU or GPU
	GOTO :FAIL
Minjie Wang's avatar
Minjie Wang committed
9
) ELSE IF x%1x==xcpux (
10
	SET DEV=-1
Minjie Wang's avatar
Minjie Wang committed
11
) ELSE IF x%1x==xgpux (
12
13
14
15
16
17
	SET DEV=0
	SET CUDA_VISIBLE_DEVICES=0
) ELSE (
	ECHO Must supply CPU or GPU
	GOTO :FAIL
)
18
CALL workon %BUILD_TAG%
19

Minjie Wang's avatar
Minjie Wang committed
20
21
22
23
24
SET DGLBACKEND=pytorch
SET DGL_LIBRARY_PATH=!CD!\build
SET PYTHONPATH=!CD!\python;!PYTHONPATH!
SET DGL_DOWNLOAD_DIR=!CD!

25
26
python -m pytest -v --junitxml=pytest_backend.xml --durations=100 tests\examples || GOTO :FAIL

Minjie Wang's avatar
Minjie Wang committed
27
PUSHD !GCN_EXAMPLE_DIR!
28
python pagerank.py || GOTO :FAIL
29
python gcn\train.py --dataset cora || GOTO :FAIL
30
31
32
33
34
35
36
37
POPD
ENDLOCAL
EXIT /B

:FAIL
ECHO Example test failed
ENDLOCAL
EXIT /B 1