The llama.cpp b10817 release introduces a new SYCL memory tracing feature to help developers understand device memory allocation patterns. This functionality is controlled by two new environment variables that allow for detailed logging of memory usage.

  • Setting GGML_SYCL_MEMTRACE=1 displays per-site memory usage, updating only when allocations increase by more than 64MiB.
  • Setting GGML_SYCL_MEMTRACE=2 logs every individual allocation and deallocation event.
  • The default reporting threshold can be customized using the GGML_SYCL_MEMTRACE_STEP variable.

This tooling is intended to assist in debugging memory-related issues and has already proven useful for improving the --fit algorithm.