#!/bin/bash
set -euo pipefail
cd /srv/home/gc-sdk/ipu-stack
source .env
task_dir=artifacts/baseline-local-planner/$1
task_layers=$2
task_binary=$3
task_runtime=$4
shift 4
mkdir -p "$task_dir"
RAYON_NUM_THREADS=8 RUST_LOG=info "$task_binary" "$IPU_CONFIG" --runtime-source "$task_runtime" --sdk "$POPLAR_SDK_ENABLED" --workload siglip-vit-benchmark --vit-layers "$task_layers" --vit-batch 1 --fuse-qkv --fp8-scale=-4 --optimization-steps 8 --exchange-stream-words 256 --reference-run --diagnostic-atol 0.2 --diagnostic-rtol 0.05 --device-lock artifacts/layout-sweep/device.lock --package "$task_dir/model.ipuexe" --profile-output "$task_dir/model.ipuprof" "$@" > "$task_dir/run.log" 2>&1
