mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2151] [CLOSED] SYCL: preserve the borrowed default queue during teardown #3885
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3885
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2151
Author: @alex4o
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:fix/sycl-owned-queue-teardown📝 Commits (1)
6f99145sycl: preserve the borrowed default queue during teardown📊 Changes
4 files changed (+89 additions, -6 deletions)
View changed files
📝
sycl/CMakeLists.txt(+4 -0)📝
sycl/include/strata/core/mtp.hpp(+2 -3)➕
sycl/probe/teardown_queue_test.cpp(+80 -0)📝
sycl/src/prefill/prefill.cpp(+3 -3)📄 Description
Summary
Do not initialize uncreated, owned SYCL queue handles with DPCT's borrowed default queue. Otherwise teardown can delete that queue and leave DPCT's default-queue pointer dangling.
Related: #1555 (the same null-sentinel migration trap; this patch targets Prefill/MtpDrafter rather than Verifier).
What changed
The existing guarded cleanup still destroys genuinely owned queues. This does not skip cleanup, change inference arithmetic, or use _Exit to hide errors.
Failure and regression
A non-serve A770 run completed a long generation, then exited with SIGSEGV. A core inspected with matching oneAPI libraries showed:
Prefill had already destroyed kv_copy even with KV prefetch disabled, because its initializer made it alias the default queue. MTP's later weight free then used that dangling queue. An unloaded/failed-load MTP object had the analogous side_ ownership problem.
The model-free GPU regression retains a live USM allocation across unloaded MTP, rejected MTP load, uninitialized prefill, repeated reset, and rejected prefill initialization. It checks default-queue identity/context/device, allocation contents, and a subsequent free. Five scenarios × eight repetitions = 40 lifecycles.
Validation
On PR base
a0116b2, A770/i915, oneAPI 2026.1:Both full engine build and regression passed. The same regression compiled against unfixed headers/libraries fails at unloaded MTP with UR_RESULT_ERROR_UNINITIALIZED; with this patch all 40 lifecycles pass.
Earlier isolated experiments on base
61b3fb5applied these same ownership fixes and completed four full-context CLI runs with normal exit 0, after the original teardown crash. These runs also included separate diagnostic/GRF changes, so they supplement—not replace—the focused regression. Validation notes.Limits
With STRATA_KV_PREFETCH=1, nullptr now allows the intended dedicated queue to be created where the old nonnull initializer suppressed creation. That opt-in asynchronous path was reviewed but not runtime-tested. Peer/multi-GPU teardown and other similar migrated sentinels are outside this focused patch. Only SYCL files are touched; CUDA/HIP were not changed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.