Skip to content

Commit 3c4d2a1

Browse files
committed
Only log on iOS and macOS, ignoring tvOS and other platforms
1 parent e26d224 commit 3c4d2a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ggml-metal.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,6 +2373,7 @@ static void ggml_backend_metal_buffer_clear(ggml_backend_buffer_t buffer, uint8_
23732373
}
23742374

23752375
static void ggml_backend_metal_log_allocated_size(id<MTLDevice> device) {
2376+
#if TARGET_OS_IOS || TARGET_OS_OSX
23762377
if (@available(macOS 10.12, iOS 16.0, *)) {
23772378
GGML_METAL_LOG_INFO(", (%8.2f / %8.2f)",
23782379
device.currentAllocatedSize / 1024.0 / 1024.0,
@@ -2386,6 +2387,7 @@ static void ggml_backend_metal_log_allocated_size(id<MTLDevice> device) {
23862387
} else {
23872388
GGML_METAL_LOG_INFO(", (%8.2f)\n", device.currentAllocatedSize / 1024.0 / 1024.0);
23882389
}
2390+
#endif
23892391
}
23902392

23912393
static ggml_backend_buffer_t ggml_backend_metal_buffer_type_alloc_buffer(ggml_backend_buffer_type_t buft, size_t size) {

0 commit comments

Comments
 (0)