-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup
56 lines (42 loc) · 1.13 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CURPATH=$(pwd)
if which java > /dev/null ; [ $? -ne 0 ]
then
echo "please setup java environment first!"
return
fi
if which cmake > /dev/null ; [ $? -ne 0 ]
then
echo "please setup cmake environment first!"
return
fi
if [ ! -n "$CUDA_PATH" ]
then
echo "please setup CUDA environment(CUDA_PATH) first!"
return
fi
if [ -n "$PTX_EMU_SUCCESS" ]
then
echo "setup successfully!"
return
fi
export PATH=${CUDA_PATH}/bin:${PATH}
export CLASSPATH=".:$(pwd)/antlr4/antlr-4.11.1-complete.jar:$CLASSPATH"
alias antlr4='java -Xmx500M -cp "$CLASSPATH" org.antlr.v4.Tool'
alias grun='java -Xmx500M -cp "$CLASSPATH" org.antlr.v4.gui.TestRig'
export PTX_EMU_SETUP=1
export PTX_EMU_PATH=$(pwd)
. antlr4/build_cpp_runtime.sh
if [ ! -n "$ANTLR_CPP_RUNTIME" ] ; then
echo "fail to build ANTLR CPP RUNTIME"
cd $PTX_EMU_PATH
return
fi
export LD_LIBRARY_PATH=${PTX_EMU_PATH}/antlr4/antlr4-cpp-runtime-4.11.1-source/run/usr/local/lib:${PTX_EMU_PATH}/lib:$LD_LIBRARY_PATH
cd ${PTX_EMU_PATH}
[ ! -d bin ] && mkdir bin
export PTX_EMU_SUCCESS=1
echo "setup successfully!"
if [ ! -f lib/libcudart.so.11.0 ]
then
make minitest
fi