run.sh 1.36 KB
Newer Older
1
#!/bin/bash
one's avatar
one committed
2
set -e
3

one's avatar
one committed
4
5
6
7
# export MIOPEN_ENABLE_LOGGING_CMD=1
# export MIOPEN_ENABLE_LOGGING=1
# export MIOPEN_LOG_LEVEL=6
# export ROCBLAS_LAYER=4
8
export HIP_VISIBLE_DEVICES=1
one's avatar
one committed
9
10
export MODEL_NAME=evo2_7b
export MODEL_PATH=/models/arcinstitute/evo2_7b/evo2_7b.pt
11

one's avatar
one committed
12
13
14
15
EVO_CMD="numactl -m 1 -N 1 \
            python -m evo2.test.test_evo2_generation_batched \
            --model_name ${MODEL_NAME} \
            --local_path ${MODEL_PATH}"
16

one's avatar
one committed
17
18
run_all_tests() {
    local batch_size=$1
19

one's avatar
one committed
20
21
22
23
    echo "================================================"
    echo "Running all tests for batch size ${batch_size}"
    echo "================================================"
    mkdir -p log &> /dev/null
24

one's avatar
one committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    echo "==== Normal run ===="
    ${EVO_CMD} --batch_size ${batch_size}

    # echo "==== Torch profiler trace for step 0 ===="
    # ${EVO_CMD} --batch_size ${batch_size} --trace --trace_step 0

    # echo "==== Torch profiler trace for step 1 ===="
    # ${EVO_CMD} --batch_size ${batch_size} --trace --trace_step 1

    # echo "==== Hipprof trace ===="
    # hipprof --hip-trace -o log/trace-bs${batch_size} \
    #     ${EVO_CMD} --batch_size ${batch_size}

    # echo "==== Nsight-systems trace ===="
    # nsys profile --force-overwrite=true \
    #     --stats=true --trace=cuda \
    #     -o log/trace-bs${batch_size} \
    #     ${EVO_CMD} --batch_size ${batch_size}
}

run_all_tests 1
run_all_tests 2