Skip to content

Commit 670b8db

Browse files
committed
metal : this should correctly check bfloat support
1 parent 6969829 commit 670b8db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ggml/src/ggml-metal.metal

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ using namespace metal;
1212

1313
#define N_SIMDWIDTH 32 // assuming SIMD group size is 32
1414

15-
#if !defined(__BFLT16_M_PI__)
15+
// ref: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
16+
//
17+
// cmd:
18+
// .../usr/bin/metal -dM -E -c ggml/src/ggml-metal.metal
19+
// .../usr/bin/metal -dM -E -c -target air64-apple-ios14.0 ggml/src/ggml-metal.metal
20+
//
21+
#if __METAL_VERSION__ < 310
1622
#define GGML_METAL_NO_BFLOAT
1723
#endif
1824

0 commit comments

Comments
 (0)