Pull requests / #1642
#1642 sycl: MtpDrafter's queue defaults to nullptr, so a run without --mtp no longer crashes at exit
open · @recutita · 0 comments · View on GitHub
BenchmarksAMD / HIPNVIDIA / CUDAModels & quantsWindowsLinux
Description
## Title Issue: none for this site. Same dpct translation as #1555 (`Verifier::ext_stream_`, PR #1589); that PR's search found no other site, this is one. ## Summary A run without `--mtp` crashes after printing its output on the SYCL port: `MtpDrafter`'s destructor waits on and destroys the device's default in-order queue. `cs_` now starts as `nullptr`, as in the CUDA source (`include/strata/core/mtp.h`: `cudaStream_t cs_ = nullptr`). ## What changed - `sycl/include/strata/core/mtp.hpp`: `dpct::queue_ptr cs_ = &dpct::get_in_order_queue()` -> `nullptr`. `load()` creates the drafter's own queue (the high-priority one, or `create_queue(true)`), so every path that uses `cs_` runs after `load()`. The destructor already tests `if (cs_)` before `wait()` and `destroy_queue()`. - `sycl/tools/fixups.py`: the same replacement as an entry, so a re-migrated tree keeps it. Checked on `fb58e0d`'s `mtp.hpp`: one run gives the committed line, a second run changes nothing. Nothing else changes: with `--mtp` the queue is created in `load()` exactly as before. ## How it was checked Arc Pro B70 (xe, Linux), main `fb58e0d`, AOT `bmg-g31`, Flash-Next IQ3_XXS, one card with the RAM mirror, `--tokens`, the same 40-token prompt: | | without `--mtp` (`--spec 2 --mtp-max-t 1 --suffix-draft 0`), 3 runs | with `--mtp`, 1 run | |---|---|---| | main `fb58e0d` | 3 of 3 exit 139 after the output (one printed `level_zero backend failed with error: 37 (UR_RESULT_ERROR_UNINITIALIZED)`, two printed nothing) | exit 0 | | this change | 3 of 3 exit 0 | exit 0 | The decoded tokens are the same before and after in both columns (identical output hashes), and so is the speed (32.4 tok/s without MTP, 54.4 with). gdb (`gdb-oneapi`, `break std::terminate`, on the 0.1.40.4 base where it also happens) put the throw in `MtpDrafter::~MtpDrafter()`, from `queue_impl::wait`. ## Extra Notes Only the SYCL port is touched (CUDA and HIP already use `nullptr`). Tested only on a B-series card by B70 under the xe driver on Linux; not tested on an Arc A-series card (i915) or on Windows. Assisted-by: Claude Code with Opus 5.5 medium
Related on strata.com
Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.