Skip to content

Commit 2a7c94d

Browse files
metal : put encoder debug group behind a define (#4873)
1 parent 64802ec commit 2a7c94d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml-metal.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,9 @@ bool ggml_metal_graph_compute(
10671067
GGML_ASSERT(!"unsupported op");
10681068
}
10691069

1070+
#ifndef GGML_METAL_NDEBUG
10701071
[encoder pushDebugGroup:[NSString stringWithCString:ggml_op_desc(dst) encoding:NSUTF8StringEncoding]];
1072+
#endif
10711073

10721074
const int64_t ne00 = src0 ? src0->ne[0] : 0;
10731075
const int64_t ne01 = src0 ? src0->ne[1] : 0;
@@ -2426,7 +2428,9 @@ bool ggml_metal_graph_compute(
24262428
}
24272429
}
24282430

2431+
#ifndef GGML_METAL_NDEBUG
24292432
[encoder popDebugGroup];
2433+
#endif
24302434
}
24312435

24322436
if (encoder != nil) {

0 commit comments

Comments
 (0)