#6296 [Other] 0.2.16 layout: Intel (SYCL) setup cannot start the server ("cannot open .../engine/run-*.sh"), and `strata bench run` from a git clone is always nonconforming
open · @mbaaku · 0 Kommentare · Auf GitHub
BenchmarksSetup & installServer & APIMulti-GPUDocumentationLinux
Beschreibung
After the 0.2.16 folder move (`engine/`, `terminal/`) three paths still point at the old place. Found while updating two Intel Arc Linux hosts (1x B70, 2x B60) from 0.2.13/0.2.15 to 0.2.16 (`64524fb9`; `main` at `58ee32277` has the same code). All three are one-line fixes; diffs below.
### 1. `./setup.sh --backend sycl` writes the start script to `terminal/` but starts it from `engine/`
`engine/sycl/setup_intel.py`, `start_sycl()`:
```python
script = ROOT / f"run-{Path(cfg_path).stem[len('strata-'):]}.sh"
```
`ROOT` in `setup_intel.py` is `engine/`, but `write_run_script()` in `terminal/setup.py` writes `run-*.sh` into the Terminal's `ROOT` (`terminal/`). Every SYCL setup that goes on to start the server ends with:
```
[ok] start script: run-unsloth-ud-q4_k_xl.sh
All set.
...
starting run-unsloth-ud-q4_k_xl.sh ...
/bin/sh: 0: cannot open /.../Strata/engine/run-unsloth-ud-q4_k_xl.sh: No such file
```
`terminal/run-unsloth-ud-q4_k_xl.sh` exists. Fix:
```diff
- script = ROOT / f"run-{Path(cfg_path).stem[len('strata-'):]}.sh"
+ script = Path(S.ROOT) / f"run-{Path(cfg_path).stem[len('strata-'):]}.sh"
```
### 2. `strata bench run` from a git clone: "the Strata commit is unknown", Status: nonconforming, "release build"
`terminal/strata_cli/bench_facts.py`: `ROOT = Path(__file__).resolve().parents[1]` is now `terminal/`. `git_commit()` checks `(folder / ".git").exists()` and `software()` checks `(ROOT / ".git").exists()`. In a clone `.git` is one folder above `terminal/`, so a run on a clone reports:
```
Status: nonconforming.
Why this is not a complete standard result:
- the Strata commit is unknown (not a git checkout and no COMMIT file)
```
and `Strata commit: not measured; ... release build` in README.md. With the fix the same setup gives `Status: complete`, `Strata commit: 64524fb9...; source build`.
```diff
- if (folder / ".git").exists():
+ if (folder / ".git").exists() or (folder.parent / ".git").exists():
...
- "build_kind": "source" if (ROOT / ".git").exists() else "release",
+ "build_kind": "source" if (ROOT / ".git").exists() or (ROOT.parent / ".git").exists() else "release",
```
(`git rev-parse HEAD` already works from `terminal/`; only the `.git` existence checks are wrong.)
### 3. `strata-sycl.sh` with `STRATA_SYCL_ROOT` set to the folder above the checkout: the engine container does `cd /work/engine`
`engine/sycl/serve/strata-sycl.sh`:
```bash
here=$(cd "$(dirname "$0")/../.." && pwd) # now engine/, was the repo root
root=${STRATA_SYCL_ROOT:-$(dirname "$here")}
repo_in=/work/$(basename "$here") # /work/engine
```
Before 0.2.16 `here` was the checkout, so `repo_in` was `/work/<checkout>` and `STRATA_SYCL_ROOT=<folder above the checkout>` worked (docs/INTEL.md: the mount is "the one above the checkout, or `STRATA_SYCL_ROOT`"). Now `repo_in` is `/work/engine`, which exists only when `/work` is the checkout itself. With models and data beside the checkout and `STRATA_SYCL_ROOT` pointing above it, the engine is at `/work/<checkout>/engine` and does not start. Fix: take the engine folder's path below the mounted root:
```diff
-repo_in=/work/$(basename "$here")
+case "$here" in
+ "${root%/}"/*) repo_in=/work/${here#"${root%/}"/} ;;
+ *) repo_in=/work/$(basename "$here") ;;
+esac
```
Not seen failing: we applied this change before the first 0.2.16 start. Checked by running the path logic: root unset gives `/work/engine` (unchanged); root = folder above the checkout gives `/work/<checkout>/engine`, also with a trailing slash; an unrelated root gives `/work/engine`.
Related to #6251 (finding 2): our run configs also carried the old `--expert-profile` path, here the container form `/work/<checkout>/data/expert-profile-sycl.bin`, which `move_over_old_layout` does not rewrite; the engine then stops with `read_expert_profile: cannot open /work/Strata/data/expert-profile-sycl.bin`.
Related, from reading the code (not run): with `here` = `engine/`, the default mount `$(dirname "$here")` and `setup_intel.MOUNT = ROOT.parent` are now the checkout itself, not "the one above the checkout" that docs/INTEL.md describes. Models in `Strata-data` beside the clone would then be outside `/work` unless `STRATA_SYCL_ROOT` is set.
With fixes 1-3 both hosts start and serve normally, and `strata bench run` reports `Status: complete`, 12 of 12 (benchmark: #6295). The upstream tests that import the changed files pass with them (66 setup/SYCL tests, 95 bench tests).Mehr auf der Site
Links zu Install, Modellen, Releases.