okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
a451dcd91
main
1#!/bin/bash 2# Regression test for the Arc A750 prompt deadlock (0.1.48): a 2,744-token prompt (a docs excerpt in chat framing, token ids in 3# data/prompt_deadlock_2744.tok) made the prompt path hang in the Level Zero driver (the thread spun in sched_yield inside 4# libze_intel_gpu while the GPU was idle) when the expert arena was DMA'd straight from pageable memory. The engine now copies 5# every expert that is not USM host memory through the stager's pinned buffers. 6# 7# STRATA_BIN=build-jit/strata MODEL_ARGS="--pack ... --native ... --ple-gguf ... --mtp ... --kv int8 --max-context 8192 ..." \ 8# sycl/tools/test_prompt_deadlock.sh 9# 10# MODEL_ARGS are the engine arguments of the box (everything but --tokens-file/--max-new); the A750 needs its usual environment 11# (render group, ONEAPI_DEVICE_SELECTOR, IGC_EnableDPEmulation=1, ...). Passes when the prefill line is printed within 12# DEADLOCK_TIMEOUT seconds (default 900; the prompt takes about 60 s on an A750 after the start-up). Exit 0 pass, 1 fail, 2 usage. 13set -u 14HERE =$( cd " $( dirname " $ 0" ) " && pwd ) 15BIN =${ STRATA_BIN :-} 16[ -n" $ BIN " ]&& [ -x" $ BIN " ]&& [ -n" ${ MODEL_ARGS :-} " ] || {echo "usage: STRATA_BIN=<strata> MODEL_ARGS=\"...\" $ 0" ;exit 2; } 17OUT =$( mktemp ) 18timeout " ${ DEADLOCK_TIMEOUT :-900} " " $ BIN " $ MODEL_ARGS --tokens-file " $ HERE /data/prompt_deadlock_2744.tok" --max-new 4--greedy > " $ OUT " 2 >&1 19rc =$ ? 20if grep -q "^prefill *2743 tokens" " $ OUT " ;then 21echo "PASS: the 2,743-token prompt was read ( $( grep -E '^prefill' " $ OUT " | head -1 | tr -s ' ' ) )" 22rm -f " $ OUT " ;exit 0 23fi 24echo "FAIL: no prefill line (engine exit code $ rc ); output kept in $ OUT " 25tail -5 " $ OUT " 26exit 1