-
Notifications
You must be signed in to change notification settings - Fork 285
feat(amd): orchestrate AMD clusters with srt-slurm #2542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0a89453
0674eaa
6439c63
d0b0f31
429de0f
190a387
74c0c85
c94d0a4
2a10192
847c80f
539f2fa
09f2299
82f3781
9092e3d
3521b76
eac80c2
cdb9e5f
80aa871
1bb89eb
5f50845
0f390f6
01676c3
38be99b
1e693fe
bd00831
31ed6ec
3684ab6
0d7ca6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,60 @@ if [[ "${EVAL_ONLY:-false}" == "true" ]]; then | |
| _wait_for_openai_chat_route --port "$PORT" | ||
| fi | ||
|
|
||
| # Preserve the legacy DP-attention replay contract. The SGLang router uses this | ||
| # header to keep every request in one AgentX correlation tree on a stable DP | ||
| # route, which is important for both session continuity and prefix-cache reuse. | ||
| if [[ "${PREFILL_DP_ATTN:-false}" == "true" ]]; then | ||
| export AIPERF_HTTP_X_SMG_ROUTING_KEY_FROM_CORRELATION_ID=true | ||
| fi | ||
|
|
||
| # Reset every advertised SGLang worker before each concurrency point, matching | ||
| # the retired amd_utils trace replay. /flush_cache covers GPU radix + host | ||
| # HiCache; the storage-backend endpoint is best-effort because L3 is optional. | ||
| clear_agentic_worker_caches() { | ||
| local timeout_seconds="${FLUSH_DRAIN_TIMEOUT:-120}" | ||
| local metrics_csv="${AIPERF_SERVER_METRICS_URLS:-}" | ||
| if [[ -z "$metrics_csv" ]]; then | ||
| echo "[clear_caches] WARN: AIPERF_SERVER_METRICS_URLS unset; skipping cache flush" >&2 | ||
| return 0 | ||
| fi | ||
|
cursor[bot] marked this conversation as resolved.
|
||
|
|
||
| local -a metrics_urls | ||
| IFS=',' read -r -a metrics_urls <<< "$metrics_csv" | ||
| local metrics_url base_url start response code flushed | ||
| for metrics_url in "${metrics_urls[@]}"; do | ||
| [[ -n "$metrics_url" ]] || continue | ||
| base_url="${metrics_url%/metrics}" | ||
| start=$(date +%s) | ||
| flushed=0 | ||
| response="" | ||
| while :; do | ||
| response=$(curl -sf -m 10 -X POST "${base_url}/flush_cache" 2>/dev/null || true) | ||
| if grep -qi "Cache flushed" <<< "$response"; then | ||
| flushed=1 | ||
| break | ||
| fi | ||
| if (( $(date +%s) - start >= timeout_seconds )); then | ||
| break | ||
| fi | ||
| sleep 3 | ||
| done | ||
| if (( flushed )); then | ||
| echo "[clear_caches] ${base_url}: L1+L2 flushed" | ||
| else | ||
| echo "[clear_caches] WARN ${base_url}: L1+L2 flush not confirmed after ${timeout_seconds}s" >&2 | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cache flush match can stall replayMedium Severity
Reviewed by Cursor Bugbot for commit 1bb89eb. Configure here. |
||
|
|
||
| code=$(curl -s -m 60 -o /dev/null -w '%{http_code}' \ | ||
| -X POST "${base_url}/hicache/storage-backend/clear" 2>/dev/null || true) | ||
| if [[ "$code" == "200" ]]; then | ||
| echo "[clear_caches] ${base_url}: L3 store cleared" | ||
| else | ||
| echo "[clear_caches] ${base_url}: L3 clear http=${code:-000} (optional backend unavailable)" | ||
| fi | ||
| done | ||
| } | ||
|
cursor[bot] marked this conversation as resolved.
|
||
|
|
||
| wait_for_agentic_servers_idle() { | ||
| local timeout_seconds="${AIPERF_DRAIN_TIMEOUT_SECONDS:-1800}" | ||
| local poll_seconds="${AIPERF_DRAIN_POLL_SECONDS:-10}" | ||
|
|
@@ -145,6 +199,9 @@ for index in "${!CONCURRENCIES[@]}"; do | |
| mkdir -p "$RESULT_DIR" | ||
|
|
||
| echo "Running agentic concurrency $concurrency of: ${CONCURRENCIES[*]}" | ||
| if [[ "${CLEAR_CACHE_BETWEEN_CONC:-1}" == "1" ]]; then | ||
| clear_agentic_worker_caches | ||
| fi | ||
| build_replay_cmd "$RESULT_DIR" | ||
| run_agentic_replay_and_write_outputs "$RESULT_DIR" | ||
|
|
||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.