]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
sycl: use async memory allocation to fix crashes during graph recording (llama/16644)
authorMatthew Michel <redacted>
Thu, 23 Oct 2025 01:05:15 +0000 (20:05 -0500)
committerGeorgi Gerganov <redacted>
Sun, 9 Nov 2025 21:38:03 +0000 (23:38 +0200)
commit0a5b4c2e9bf6848707af3e7f2ce835e6fbc51072
tree376d2189d27bdecc0495b34b796a6887649fc3a0
parent8bb12395fe0b9781b60595125f1d056b1e2aabbd
sycl: use async memory allocation to fix crashes during graph recording (llama/16644)

* sycl: use async memory allocation to fix graph recording failures

GGML_SYCL_DISABLE_GRAPHS=0 causes crashes because:
  - Host waits are currently unsupported in graph recording mode.
  - SYCL malloc / free calls are unsupported in graph recording mode.

The following changes are made to fix SYCL graph functionality:
  - When graphs are enabled, use the SYCL async memory extension for temp
    buffers which is supported with SYCL graphs.
  - For compiler versions that do not support this extension, skip
    graphs with the affected op.
  - Switch from USM shared to device memory as the async extension
    currently just supports device allocations.

* Address reviewer feedback

* Use global async variable to decide path in sycl_ext_[malloc_device|free]
ggml/src/ggml-sycl/ggml-sycl.cpp