Skip to content

Commit

Permalink
metal : add BF16 support (#8439)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ggerganov authored Nov 6, 2024
1 parent b11f9ba commit 5c333e0
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 184 deletions.
3 changes: 3 additions & 0 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,9 @@ static ggml_type kv_cache_type_from_str(const std::string & s) {
if (s == "f16") {
return GGML_TYPE_F16;
}
if (s == "bf16") {
return GGML_TYPE_BF16;
}
if (s == "q8_0") {
return GGML_TYPE_Q8_0;
}
Expand Down
Loading

0 comments on commit 5c333e0

Please sign in to comment.