Skip to content

Commit 2294f07

Browse files
committed
metal : fix maxTransferRate check
1 parent a70379d commit 2294f07

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ggml/src/ggml-metal.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,12 @@ @implementation GGMLMetalClass
497497
if (@available(macOS 10.12, iOS 16.0, *)) {
498498
GGML_LOG_INFO("%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, device.recommendedMaxWorkingSetSize / 1e6);
499499
}
500-
#elif TARGET_OS_OSX
501-
if (device.maxTransferRate != 0) {
502-
GGML_LOG_INFO("%s: maxTransferRate = %8.2f MB/s\n", __func__, device.maxTransferRate / 1e6);
503-
} else {
504-
GGML_LOG_INFO("%s: maxTransferRate = built-in GPU\n", __func__);
500+
if (@available(macOS 10.15, *)) {
501+
if (device.maxTransferRate != 0) {
502+
GGML_LOG_INFO("%s: maxTransferRate = %8.2f MB/s\n", __func__, device.maxTransferRate / 1e6);
503+
} else {
504+
GGML_LOG_INFO("%s: maxTransferRate = built-in GPU\n", __func__);
505+
}
505506
}
506507
#endif
507508

0 commit comments

Comments
 (0)