-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (28 loc) · 965 Bytes
/
Makefile
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
DEVICE=0
N_BATCHES=2000
BATCH_SIZE=200
DIM=100
KERN_W=7
N_KERNS=64
EXECS:conv_1d.o conv_1d_gpu.o
all: ${EXECS}
test_cpu:
git pull
gcc -std=c99 conv_1d.c -o conv_1d.o
./conv_1d.o ${N_BATCHES} ${BATCH_SIZE} ${DIM} ${KERN_W} ${N_KERNS}
test_gpu:
git pull
nvcc -arch=sm_21 -o conv_1d_gpu.o conv_1d_gpu.cu
./conv_1d_gpu.o ${N_BATCHES} ${BATCH_SIZE} ${DIM} ${KERN_W} ${N_KERNS} ${DEVICE}
test_theano_cpu:
git pull
THEANO_FLAGS=floatX=float32 python theano_benchmark.py --n_batches ${N_BATCHES} --batch_size ${BATCH_SIZE} --dim ${DIM} --kern_w ${KERN_W} --n_kerns ${N_KERNS}
test_theano_gpu:
git pull
THEANO_FLAGS=mode=FAST_RUN,device=gpu${DEVICE},floatX=float32 python theano_benchmark.py --n_batches ${N_BATCHES} --batch_size ${BATCH_SIZE} --dim ${DIM} --kern_w ${KERN_W} --n_kerns ${N_KERNS}
sync: Makefile conv_1d_gpu.cu
git add Makefile conv_1d_gpu.cu conv_1d.c theano_benchmark.py
git commit -m "Syncing with master"
git push
clean:
rm ${EXECS}