metal : this should correctly check bfloat support

This commit is contained in:
Georgi Gerganov 2024-11-06 19:31:45 +02:00
parent 69698299ee
commit 670b8dbe7c
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -12,7 +12,13 @@ using namespace metal;
#define N_SIMDWIDTH 32 // assuming SIMD group size is 32
#if !defined(__BFLT16_M_PI__)
// ref: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
//
// cmd:
// .../usr/bin/metal -dM -E -c ggml/src/ggml-metal.metal
// .../usr/bin/metal -dM -E -c -target air64-apple-ios14.0 ggml/src/ggml-metal.metal
//
#if __METAL_VERSION__ < 310
#define GGML_METAL_NO_BFLOAT
#endif