贡献 / #1782
#1782 serve: effort_position "end" reads the SYCL engine binary, not its launcher script (#1781)
closed · @leadgtr7 · 0 评论 · 去 GitHub 看
BenchmarksServer & APIAMD / HIPNVIDIA / CUDA
说明
## Title
Issue: Resolves #1781
## Summary
`"effort_position": "end"` (#458) never turned on with the Intel port: the server checked the launcher script `sycl/serve/strata-sycl.sh` for `--tail-role-token` instead of the engine binary it runs, and fell back to the top-of-prompt effort with "needs engine 0.1.39 or newer". This resolves the launcher to its binary before the check. CUDA and HIP are untouched: their `exe` is the engine and is read as before.
## What changed
- `serve/server.py`: new `engine_binary(exe, cfg)`. For an `exe` named `strata-sycl.sh` it returns the launcher's repo + `STRATA_SYCL_BIN` (from the config's `env`, else the environment, else `build-sycl-aot/strata`, the launcher's own default) when that file exists; otherwise `exe` unchanged. `effort_end_args()` reads that file instead of `exe`. Nothing else uses it.
- `tools/test_effort_end_args.py` (new, no GPU, fake files in a temp repo): launcher + binary with the option -> args; binary without it -> None; `STRATA_SYCL_BIN` from the config's `env`; launcher with no binary -> falls back to reading the launcher (old behaviour); a plain engine `exe` with and without the option (unchanged path); `start`/unset stays off.
## How it was checked
- `python -m unittest tools.test_effort_end_args`: 6 pass on `fb58e0d` + this commit. Without the `server.py` change the two launcher tests fail (2 failures), so they test the fix.
- On an Arc Pro B65 (engine 0.1.41 built with `sycl/tools/build.sh`), `engine_binary(".../sycl/serve/strata-sycl.sh", {})` resolves to `.../build-sycl-aot/strata`, which contains `--tail-role-token`.
- Not tested: a full server start with `effort_position: end` on this exact commit (the card was busy with a benchmark); the default path (`effort_position` unset or `start`) returns before the new code, so it is unchanged.
## Extra Notes
Only the Python server is touched; no engine rebuild needed. Assisted-by: Claude Code.
本站相关内容
相关页面的快捷入口。