-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patht
More file actions
executable file
·59 lines (46 loc) · 919 Bytes
/
t
File metadata and controls
executable file
·59 lines (46 loc) · 919 Bytes
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
#!/bin/sh
set -e
# export STDML_COLLECTIVE_ENABLE_LOG=1
rebuild() {
./configure --tests
make -j $(nproc)
}
kungfu_run_flags() {
local np=$1
local logdir=$2
echo -q
echo -logdir $logdir
echo -H "127.0.0.1:$np"
echo -np $np
}
kungfu_run() {
local np=$1
shift
local logdir=$1
shift
kungfu-run $(kungfu_run_flags $np $logdir) $@
}
trace() {
echo "BEGIN $@"
$@
echo "END $@"
echo
echo
}
test_all() {
local max_np=$1
local prog=$2
for np in $(seq 1 $max_np); do
trace kungfu_run $np "logs/test/np=$np" $prog
done
}
main() {
trace rebuild
trace test_all 16 ./bin/test-broadcast
export STDML_COLLECTIVE_USE_THREAD_POOL=0
trace test_all 16 ./bin/test-all-reduce
export STDML_COLLECTIVE_USE_THREAD_POOL=1
trace test_all 16 ./bin/test-all-reduce
trace test_all 16 ./bin/test-all-gather
}
main