Files
Piotr WilkinandClaude Fable 5.1 16db737a1c ggml: add cross-backend profiler
Add an optional per-op / per-copy profiler to the ggml scheduler that
records timed events across all backends of a split graph, so a single
run can be inspected end to end (compute kernels, host<->device copies,
fusion names, tensor shapes/strides/types, op params).

- ggml-profiler.h/.cpp: ggml_profile_record, per-backend profiler
  interface (enable/reset/get_records), JSON export
- ggml-backend.cpp: scheduler-level collection, copy events, backend
  attribution, mul_mat_id stats, throughput stat, concurrent-mode fix,
  auto-export via GGML_PROFILE env var
- Backend profilers: CPU, CUDA/HIP/MUSA (event-based timing), Vulkan
  (timestamp queries), BLAS, Metal (tentative); stubs for the remaining
  backends
- llama: expose profiler enable/export; --profile, --profile-output,
  --with-backends args in common; hooks in server, completion and the
  debug example
- tools/profiler/profiler.py: analysis tool (per-op / per-backend
  summaries, Chrome trace export)
- test-backend-ops / test-export-graph-ops: run perf tests with exactly
  the tensor shapes recorded in a profile (converged with
  export-graph-ops)
- docs/cross-profiler.md
- ggml-cuda: avoid ROCm_Host compute on HIP integrated GPUs

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ney1sm8n1bSjeA3DrrW5ah
2026-09-07 13:42:53 +02:00
..
2026-09-07 13:42:53 +02:00
2026-09-07 13:42:53 +02:00