@@ -6,24 +6,13 @@ NUM_TOKENS=10
66PROMPT_SIZE=1000
77PROFILE_TYPE=decode
88
9- MPS_PERC=50
9+ NUM_REQUESTS=10
1010INTER_FILE=" inter_sm/comp_kernel_config.json"
1111RESULTS=" inter_sm/results_comp"
12+ NSYS_FILE=" output"
13+ PLOTS=" inter_sm/plots"
1214
13- NSYS_FILE=" output_comp_1_512_3"
14-
15- echo " ------------------------------------"
16- echo " Starting MPS"
17- export CUDA_VISIBLE_DEVICES=0
18- export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps # Select a location that’s accessible to the given $UID
19- export CUDA_MPS_LOG_DIRECTORY=/tmp/nvidia-log # Select a location that’s accessible to the given $UID
20- nvidia-cuda-mps-control -d
21-
22- function cleanup() {
23- echo " Shutting down MPS control daemon..."
24- echo quit | nvidia-cuda-mps-control
25- echo " MPS control daemon shut down."
26- }
15+ TB_SIZES=(0 34 68 102 136)
2716
2817# nsys profile \
2918# -w true \
@@ -32,12 +21,23 @@ function cleanup() {
3221# --cuda-graph-trace node \
3322# --force-overwrite true \
3423# -o "$NSYS_FILE".nsys-rep \
35- CUDA_MPS_ACTIVE_THREAD_PERCENTAGE=50 python3 inter_sm/mps_test.py \
36- --model $MODEL \
37- --profile $PROFILE_TYPE \
38- --prompt_size $PROMPT_SIZE \
39- --num_tokens $NUM_TOKENS \
40- --batch_size $BATCH_SIZE \
41- --mps $MPS_PERC \
42- --interference_config_json $INTER_FILE \
43- --inter_tb 1
24+
25+ mkdir -p $RESULTS
26+ mkdir -p $PLOTS
27+
28+ # for tb in "${TB_SIZES[@]}"
29+ # do
30+ # echo "$tb"
31+ # python3 inter_sm/gcontext_test.py \
32+ # --model $MODEL \
33+ # --profile $PROFILE_TYPE \
34+ # --prompt_size $PROMPT_SIZE \
35+ # --num_tokens $NUM_TOKENS \
36+ # --batch_size $BATCH_SIZE \
37+ # --num_requests $NUM_REQUESTS \
38+ # --interference_config_json $INTER_FILE \
39+ # --inter_tb $tb \
40+ # --inter_decode > "$RESULTS/output_comp_$tb.txt"
41+ # done
42+
43+ python inter_sm/process_results.py --output_dir $RESULTS --fig_path $PLOTS /comp.png --num_tokens $NUM_TOKENS --vary_grid
0 commit comments