llama.cpp Release b10817 Adds SYCL Memory Tracing Tools
llama.cpp release b10817 introduces new environment variables, `GGML_SYCL_MEMTRACE` and `GGML_SYCL_MEMTRACE_STEP`, for memory tracing on the SYCL backend. These variables allow developers to monitor device memory allocations and deallocations by site during model execution. Detailed memory tracking helps developers optimize memory placement algorithms like `--fit` and debug memory leaks when running LLMs on SYCL hardware backends. This improves resource efficiency and stability for deployments using Intel GPUs and other SYCL-compatible hardware. Enabling the tracing feature requires setting the logging verbosity level to `-lv 4`. Setting `GGML_SYCL_MEMTRACE=1` reports memory usage updates whenever allocations grow by 64MiB (customizable via `GGML_SYCL_MEMTRACE_STEP`), while level 2 logs every single memory allocation and deallocation.
## BACKGROUND
llama.cpp is a popular open-source C++ framework designed for efficient Large Language Model (LLM) inference across diverse hardware architectures. SYCL is an open C++ programming standard maintained by the Khronos Group for heterogeneous parallel computing, commonly used to run compute workloads on Intel GPUs and other hardware accelerators.