metal : avoid breaking build when metal API predates TARGET_OS_VISION

Avoids breakage in nix flake build introduced by b0569130c5
This commit is contained in:
Charles Duffy 2025-02-05 16:52:43 -06:00
parent 534c46b53c
commit 8e2b1c653a
No known key found for this signature in database
GPG key ID: 951ECD0EF7F697D9

View file

@ -19,6 +19,10 @@
// max number of MTLCommandBuffer used to submit a graph for processing
#define GGML_METAL_MAX_COMMAND_BUFFERS 8
#ifndef TARGET_OS_VISION
#define TARGET_OS_VISION 0
#endif
// create residency sets only on macOS >= 15.0
#if TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 || \
TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000 || \