[PR #1782] [CLOSED] serve: effort_position "end" reads the SYCL engine binary, not its launcher script (#1781) #3668

Closed
opened 2026-11-07 15:29:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1782
Author: @leadgtr7
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: sycl-effort-end-binary


📝 Commits (1)

  • f3f88ee serve: effort_position "end" reads the SYCL engine binary, not its launcher script, for --tail-role-token

📊 Changes

2 files changed (+97 additions, -1 deletions)

View changed files

📝 serve/server.py (+15 -1)
➕ tools/test_effort_end_args.py (+82 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1782 **Author:** [@leadgtr7](https://github.com/leadgtr7) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `sycl-effort-end-binary` --- ### 📝 Commits (1) - [`f3f88ee`](https://github.com/Niko1221/Strata/commit/f3f88ee3bbc0f9b4363b014c856781eb07855faf) serve: effort_position "end" reads the SYCL engine binary, not its launcher script, for --tail-role-token ### 📊 Changes **2 files changed** (+97 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+15 -1) ➕ `tools/test_effort_end_args.py` (+82 -0) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:56 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3668
No description provided.