File size: 1,959 Bytes
3bbd5dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# Launch every Phase 2b measurement concurrently across the four GPUs.
#
# GPU 3 (24GB P6000) is the only card that fits Sarvam-1 in fp32, so both
# Sarvam cells run there back to back; the Llama cells and the ByT5 driving
# mode comparison occupy GPUs 0-2 in parallel. Start timestamps are recorded
# so the concurrency can be checked after the fact rather than assumed.
set -uo pipefail
cd "$(dirname "$0")/.."
source .venv/bin/activate

OUT="${1:?usage: phase2b_run_all.sh <output_dir>}"
mkdir -p "$OUT"
: > "$OUT/concurrency.log"

launch() {
  local gpu="$1" tag="$2"; shift 2
  echo "$(date '+%F %T') launch tag=$tag gpu=$gpu" >> "$OUT/concurrency.log"
  CUDA_VISIBLE_DEVICES="$gpu" "$@" > "$OUT/$tag.log" 2>&1
  echo "$(date '+%F %T') finish tag=$tag gpu=$gpu rc=$?" >> "$OUT/concurrency.log"
}

# GPU 3: both Sarvam cells, sequential (memory-bound)
( launch 3 sarvam_dev python scripts/phase2b_blocker_a.py --cell sarvam_dev --out "$OUT/a_sarvam_dev.json"
  launch 3 sarvam_rom python scripts/phase2b_blocker_a.py --cell sarvam_rom --out "$OUT/a_sarvam_rom.json" ) &

# GPUs 0,1: the two Llama cells, fully parallel
( launch 0 llama_dev python scripts/phase2b_blocker_a.py --cell llama_dev --out "$OUT/a_llama_dev.json" ) &
( launch 1 llama_rom python scripts/phase2b_blocker_a.py --cell llama_rom --out "$OUT/a_llama_rom.json" ) &

# GPU 2: blocker B architecture test (both driving modes, spread positions,
# full horizon grid), then the trough-depth comparison across L1/L4/L5 at
# horizon 1 only -- trough depth reads horizon-1 points exclusively, so the
# higher horizons would be paid for and discarded.
( launch 2 b_arch python scripts/phase2b_blocker_b.py --limit 40 --strategies first,spread --out "$OUT/b_arch.json"
  launch 2 b_trough_L5 python scripts/phase2b_blocker_b.py --limit 400 --max-horizon 1 --strategies spread --out "$OUT/b_trough_L5.json" ) &

wait
echo "$(date '+%F %T') all done" >> "$OUT/concurrency.log"