From: Jack Mousseau Date: Wed, 10 Jan 2024 14:19:19 +0000 (-0800) Subject: metal : wrap each operation in debug group (#690) X-Git-Tag: upstream/0.0.1642~1109 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2f3b12fbd6cf4cb41ad4c8fdfd65e937f5c92093;p=pkg%2Fggml%2Fsources%2Fggml metal : wrap each operation in debug group (#690) --- diff --git a/src/ggml-metal.m b/src/ggml-metal.m index 6c2a8d04..16190682 100644 --- a/src/ggml-metal.m +++ b/src/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) {