Skip to content

Commit

Permalink
metal : put encoder debug group behind a define (ggerganov#4873)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsochantaris authored Jan 11, 2024
1 parent 64802ec commit 2a7c94d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,9 @@ bool ggml_metal_graph_compute(
GGML_ASSERT(!"unsupported op");
}

#ifndef GGML_METAL_NDEBUG
[encoder pushDebugGroup:[NSString stringWithCString:ggml_op_desc(dst) encoding:NSUTF8StringEncoding]];
#endif

const int64_t ne00 = src0 ? src0->ne[0] : 0;
const int64_t ne01 = src0 ? src0->ne[1] : 0;
Expand Down Expand Up @@ -2426,7 +2428,9 @@ bool ggml_metal_graph_compute(
}
}

#ifndef GGML_METAL_NDEBUG
[encoder popDebugGroup];
#endif
}

if (encoder != nil) {
Expand Down

0 comments on commit 2a7c94d

Please sign in to comment.