From a4352bd4a3b4c82d4a353867d23604dcc5643d57 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 40fe3d82ec..002e3bb196 100644 --- a/ggml/src/ggml-cann/ggml-cann.cpp +++ b/ggml/src/ggml-cann/ggml-cann.cpp @@ -2985,7 +2985,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 dd604db433..4dd352e7a0 100644 --- a/ggml/src/ggml-hexagon/ggml-hexagon.cpp +++ b/ggml/src/ggml-hexagon/ggml-hexagon.cpp @@ -3004,6 +3004,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 b3058b4af7..7c36b3c5e1 100644 --- a/ggml/src/ggml-openvino/ggml-openvino.cpp +++ b/ggml/src/ggml-openvino/ggml-openvino.cpp @@ -673,6 +673,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 a63ee2b9d2..912aa2ff4b 100644 --- a/ggml/src/ggml-virtgpu/ggml-backend.cpp +++ b/ggml/src/ggml-virtgpu/ggml-backend.cpp @@ -63,6 +63,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)