Skip to content

Commit 6969829

Browse files
committed
metal : try to fix BF16 support check
ggml-ci
1 parent ad12269 commit 6969829

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ggml/src/ggml-metal.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,6 @@ @implementation GGMLMetalClass
496496
// dictionary of preprocessor macros
497497
NSMutableDictionary * prep = [NSMutableDictionary dictionary];
498498

499-
if (!ctx_dev->has_bfloat) {
500-
[prep setObject:@"GGML_METAL_NO_BFLOAT" forKey:@"GGML_METAL_NO_BFLOAT"];
501-
}
502-
503499
MTLCompileOptions * options = [MTLCompileOptions new];
504500
options.preprocessorMacros = prep;
505501

ggml/src/ggml-metal.metal

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ using namespace metal;
1212

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

15+
#if !defined(__BFLT16_M_PI__)
16+
#define GGML_METAL_NO_BFLOAT
17+
#endif
18+
1519
#if !defined(GGML_METAL_NO_BFLOAT)
1620
typedef matrix<bfloat, 4, 4> bfloat4x4;
1721
#endif

0 commit comments

Comments
 (0)