Pull requests / #1589
#1589 sycl: keep the null-stream sentinel a sentinel in Verifier (#1555)
open · @nekomario28 · 0 コメント · GitHub で見る
AMD / HIPNVIDIA / CUDAModels & quants
本文
Fixes #1555. The dpct migration changed `cudaStream_t ext_stream_ = nullptr` into `dpct::queue_ptr ext_stream_ = &dpct::get_in_order_queue()`, evaluated at construction on whichever device is current then — not "no stream". With a stage constructed on device 0 and `init`'ed on device 1, the `!= &get_in_order_queue()` test at `init()` compared a device-0 pointer against a device-1 queue, so `cs_` took **device 0's queue** → `Cannot submit to a queue with a dependency from a graph that is associated with a different context` / `UR_RESULT_ERROR_DEVICE_LOST`. ## Changes - `sycl/include/strata/core/verify.hpp`: `ext_stream_ = nullptr` — restores the CUDA sentinel contract (`include/strata/core/verify.hpp:319`). - `sycl/src/core/verify.cpp`: `init()` tests `ext_stream_ != nullptr`, matching the CUDA `src/core/verify.cpp:604`. The teardown at line 377 (`cs_ && cs_ != ext_stream_`) and the create_queue fallback at line 619 already work under the restored sentinel: an unset `ext_stream_` falls back to creating the stage's own queue; a `set_stream`'d one is never destroyed here. ## Test plan - Verified against the CUDA original the migration came from: sentinel `nullptr`, `init()` nullptr-test, teardown ownership test — the SYCL side now matches all three. - `git grep` over `sycl/` for other sites treating `&get_in_order_queue()` as an unset sentinel — none besides this one (the other captures are call-time locals/default args, evaluated in the right context). Not tested: a SYCL compile or a multi-device run — no SYCL toolchain here; the fix is a semantic restore of the CUDA code it was migrated from, which the reporter's trace already diagnosed.
関連リンク
インストール・モデル・リリースへの站内リンク。