]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
metal : wrap each operation in debug group (ggml/690)
authorJack Mousseau <redacted>
Wed, 10 Jan 2024 14:19:19 +0000 (06:19 -0800)
committerGeorgi Gerganov <redacted>
Thu, 11 Jan 2024 19:50:00 +0000 (21:50 +0200)
ggml-metal.m

index 6c2a8d04e529228f056a696ff1904ebc71f05428..1619068244b490a87131ddf67d4a733cd766899f 100644 (file)
@@ -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) {