summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Mousseau <jmousseau@users.noreply.github.com>2024-01-10 06:19:19 -0800
committerGeorgi Gerganov <ggerganov@gmail.com>2024-01-11 09:39:05 +0200
commit5362e43962e84d61e20b91f34991d7ccaef4a7d5 (patch)
treeb95a85f4f3cb5259ab5847394851abe7c30457d0
parente739de790921e6abbc8c70398303cacd74913f61 (diff)
metal : wrap each operation in debug group (ggml/690)
-rw-r--r--ggml-metal.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/ggml-metal.m b/ggml-metal.m
index 6c2a8d04..16190682 100644
--- a/ggml-metal.m
+++ b/ggml-metal.m
@@ -1067,6 +1067,8 @@ bool ggml_metal_graph_compute(
GGML_ASSERT(!"unsupported op");
}
+ [encoder pushDebugGroup:[NSString stringWithCString:ggml_op_desc(dst)]];
+
const int64_t ne00 = src0 ? src0->ne[0] : 0;
const int64_t ne01 = src0 ? src0->ne[1] : 0;
const int64_t ne02 = src0 ? src0->ne[2] : 0;
@@ -2423,6 +2425,8 @@ bool ggml_metal_graph_compute(
GGML_ASSERT(false);
}
}
+
+ [encoder popDebugGroup];
}
if (encoder != nil) {