Skip to content

Commit 915562e

Browse files
ggerganovarthw
authored andcommitted
metal : add BF16 support (ggml-org#8439)
* ggml : add initial BF16 support ggml-ci * metal : add mul_mat_id BF16 support ggml-ci * metal : check for bfloat support on the Metal device ggml-ci * metal : better var names [no ci] * metal : do not build bfloat kernels when not supported ggml-ci * metal : try to fix BF16 support check ggml-ci * metal : this should correctly check bfloat support
1 parent 5f4d30b commit 915562e

File tree

4 files changed

+317
-184
lines changed

4 files changed

+317
-184
lines changed

common/common.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,9 @@ static ggml_type kv_cache_type_from_str(const std::string & s) {
10031003
if (s == "f16") {
10041004
return GGML_TYPE_F16;
10051005
}
1006+
if (s == "bf16") {
1007+
return GGML_TYPE_BF16;
1008+
}
10061009
if (s == "q8_0") {
10071010
return GGML_TYPE_Q8_0;
10081011
}

0 commit comments

Comments
 (0)