From aee6d5da2ca6d7b51015d03e81710d803f42ca69 Mon Sep 17 00:00:00 2001 From: Piotr Wilkin Date: Sun, 29 Mar 2026 01:57:02 +0100 Subject: [PATCH] Fix more missing backend stuff (and Python errors) --- ggml/src/ggml-cann/ggml-cann.cpp | 3 ++- ggml/src/ggml-hexagon/ggml-hexagon.cpp | 1 + ggml/src/ggml-openvino/ggml-openvino.cpp | 1 + ggml/src/ggml-virtgpu/ggml-backend.cpp | 1 + tools/profiler/profiler.py | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml-cann/ggml-cann.cpp b/ggml/src/ggml-cann/ggml-cann.cpp index 5f51ea3bb3..6031f178a9 100644 --- a/ggml/src/ggml-cann/ggml-cann.cpp +++ b/ggml/src/ggml-cann/ggml-cann.cpp @@ -3035,7 +3035,8 @@ ggml_backend_t ggml_backend_cann_init(int32_t device) { new ggml_backend{ /* .guid = */ ggml_backend_cann_guid(), /* .interface = */ ggml_backend_cann_interface, /* .device = */ ggml_backend_reg_dev_get(ggml_backend_cann_reg(), device), - /* .context = */ ctx }; + /* .context = */ ctx, + /* .profiler = */ nullptr }; return cann_backend; } diff --git a/ggml/src/ggml-hexagon/ggml-hexagon.cpp b/ggml/src/ggml-hexagon/ggml-hexagon.cpp index 76c71d7ee7..6d5a9e916c 100644 --- a/ggml/src/ggml-hexagon/ggml-hexagon.cpp +++ b/ggml/src/ggml-hexagon/ggml-hexagon.cpp @@ -3853,6 +3853,7 @@ static ggml_backend_t ggml_backend_hexagon_device_init(ggml_backend_dev_t dev, c /* .interface = */ hexagon_backend_i, /* .device = */ dev, /* .context = */ sess, + /* .profiler = */ nullptr, }; GGML_UNUSED(params); diff --git a/ggml/src/ggml-openvino/ggml-openvino.cpp b/ggml/src/ggml-openvino/ggml-openvino.cpp index 659dbd4b5a..7249d0d0ac 100644 --- a/ggml/src/ggml-openvino/ggml-openvino.cpp +++ b/ggml/src/ggml-openvino/ggml-openvino.cpp @@ -703,6 +703,7 @@ GGML_BACKEND_API ggml_backend_t ggml_backend_openvino_init(int device) { /* .interface = */ ggml_backend_openvino_interface, /* .device = */ ggml_backend_reg_dev_get(ggml_backend_openvino_reg(), device), /* .context = */ ctx, + /* .profiler = */ nullptr, }; return openvino_backend; diff --git a/ggml/src/ggml-virtgpu/ggml-backend.cpp b/ggml/src/ggml-virtgpu/ggml-backend.cpp index 12756c9282..c4829ae9f8 100644 --- a/ggml/src/ggml-virtgpu/ggml-backend.cpp +++ b/ggml/src/ggml-virtgpu/ggml-backend.cpp @@ -65,6 +65,7 @@ ggml_backend_t ggml_backend_remoting_device_init(ggml_backend_dev_t dev, const c /* .interface = */ ggml_backend_remoting_interface, /* .device = */ ggml_backend_reg_dev_get(ggml_backend_virtgpu_reg(), ctx->device), /* .context = */ ctx, + /* .profiler = */ nullptr, }; return remoting_backend; diff --git a/tools/profiler/profiler.py b/tools/profiler/profiler.py index 3dd5f6b1da..b81343c8fb 100644 --- a/tools/profiler/profiler.py +++ b/tools/profiler/profiler.py @@ -223,7 +223,7 @@ class ProfileData: # Track the ne from the longest individual call if rec.duration_ns >= s.max_ns: - s.representative_ne = list(rec.ne) + s.representative_ne = list(rec.ne_src0) return sorted(groups.values(), key=lambda s: s.total_ns, reverse=True)