This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_bench_sweep_sparse.sh
67 lines (61 loc) · 1.78 KB
/
run_bench_sweep_sparse.sh
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
55
56
57
58
59
60
61
62
63
64
65
66
67
# export KMP_SETTINGS=TRUE # Output OpenMP environment variables
export KMP_AFFINITY
export OMP_NUM_THREADS
export KMP_BLOCKTIME
export MKL_NUM_THREADS
export MKLDNN_VERBOSE
MKLDNN_VERBOSE=1
PY_MAIN=./src/benchmark_sparse.py
vals_nthreads="1 2 4 7 14 28 56 112"
#vals_nthreads="1 2 4"
vals_kmp_blocktime="0 1 10 50 200"
#for i in $vals_nthreads; do
# for j in $vals_kmp_blocktime; do
# echo OMP_THREADS=$i, KMP_BLOCKTIME=$j, AFFINITY=0
# OMP_NUM_THREADS=$i
# MKL_NUM_THREADS=$i
# KMP_BLOCKTIME=$j
# /opt/conda/bin/python $PY_MAIN
# done
#done
###################################
## KMP_AFFINITY
###################################
#KMP_AFFINITY=granularity=fine,compact,1,0
#for i in $vals_nthreads; do
# for j in $vals_kmp_blocktime; do
# echo OMP_THREADS=$i, KMP_BLOCKTIME=$j, AFFINITY=1
# OMP_NUM_THREADS=$i
# MKL_NUM_THREADS=$i
# KMP_BLOCKTIME=$j
# /opt/conda/bin/python $PY_MAIN
# done
#done
##################################
# KMP_AFFINITY
##################################
KMP_AFFINITY=noverbose,warnings,respect,granularity=core,none
for i in $vals_nthreads; do
for j in $vals_kmp_blocktime; do
echo OMP_THREADS=$i, KMP_BLOCKTIME=$j, AFFINITY=2
OMP_NUM_THREADS=$i
MKL_NUM_THREADS=$i
KMP_BLOCKTIME=$j
/opt/conda/bin/python $PY_MAIN
done
done
###################################
## NUMA
###################################
#echo "NUMA Control"
#echo "KMP_AFFINITY SET."
#KMP_AFFINITY=granularity=fine,compact,1,0
#for i in $vals_nthreads; do
# for j in $vals_kmp_blocktime; do
# echo OMP_THREADS=$i, KMP_BLOCKTIME=$j
# OMP_NUM_THREADS=$i
# MKL_NUM_THREADS=$i
# KMP_BLOCKTIME=$j
# numactl --cpunodebind=1 --membind=1 python /opt/conda/bin/python src/benchmark_rnn.py
# done
#done