mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1555] dpct migration: \cudaStream_t ext_stream_ = nullptr\ becomes a captured queue, so a multi-device stage runs on the constructing device's queue #622
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#622
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?
Originally created by @demetree on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1555
cudaStream_t ext_stream_ = nullptrmigrated to a queue, and "no stream" became "this device's in-order queue"Not Windows-specific: this is the dpct migration of a null-stream sentinel, and it affects any backend with more
than one device. Found by TeppeiLan1104 while testing the SYCL port (PR #1390) on two GPUs.
sycl/include/strata/core/verify.hpp:The pointer form is evaluated when the Verifier is constructed, so the member initialiser captures the in-order
queue of whichever device happens to be current at that moment - not "no stream". Two places then compare against it:
With the initialiser changed and the test unchanged, the condition is almost never true on the constructing device
(it compares a pointer to itself), so the assignment usually does not happen - but on a stage constructed on device 0
and
init'ed on device 1, the in-order queue pointer differs andcs_takes device 0's queue:Two failures follow, depending on the shared-expert path:
Cannot submit to a queue with a dependency from a graph that is associated with a different contextat the first window;STRATA_SH_STREAM=0:UR_RESULT_ERROR_DEVICE_LOST.The same initialiser also decides teardown, where
if (cs_ && cs_ != ext_stream_)is the "this stream is ours todestroy" test.
What I would change
Keep the sentinel a sentinel.
nullptrmeans "no explicit stream", which is what the CUDA source says, and themigration should either preserve that or rewrite every comparison site at once:
and the same in the destructor. I have carried this correction in the SYCL port's
sycl/tools/fixups.pyso are-migration keeps it, but the migration output itself should not emit a captured queue for a null sentinel - that
will bite the next dpct consumer the same way.
PR #1390 has the port's side with the measurements. Happy to test anything on two devices if a second one turns up.
@tylerfloyd commented on GitHub (Oct 8, 2026):
Confirming this on 2× Arc Pro B70 (xe, kernel 7.0.0-31, compute-runtime 26.35) at
d5ea713(0.1.40.3), AOTbmg-g31, IQ3_S,--layer-split auto --stream-experts --kv int8 --kv-resident 32768 --spec 4 --mtp,ONEAPI_DEVICE_SELECTOR=level_zero:0,1.With the #1440 item-2 fix applied locally (it is the
device_free_bytes()change that went into 0.1.41), the split loads withlayer split: 100% of the experts resident(layers 0-24 on card 0, 25-47 plus the head on card 1). The first request then fails exactly as described here:One data point that may help:
STRATA_VERIFY_EAGER=1does not avoid it. Without the graph, the first request returnsverify: error, thenlevel_zero backend failed with error: 20 (UR_RESULT_ERROR_DEVICE_LOST)and the engine segfaults (exit 139). That fitscs_holding card 0's queue for the card-1 stage, which your analysis points to, rather than anything specific to graph capture. Killing the engine while it was in that state leftccsengine resets on both cards (Fault response: Unsuccessful -EINVAL, aCAT erroron card 1,Timedout job ... in strata); both cards recovered without a reboot.A single B70 with the same build and model is stable and fast for us (IQ3_S: ~55 tok/s decode, ~566 tok/s prefill at 252K context), so we'll retest the split once this fix lands.
@Niko1221 commented on GitHub (Oct 10, 2026):
Fixed in v0.1.42 with PR #1589 (nekomario28):
ext_stream_is a nullptr sentinel again, so a verifier built on one device and initialised on another no longer adopts the constructing device's queue. Thank you for the precise diagnosis.@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.