Spaces:
Sleeping
Sleeping
Yuri Khrustalev
commited on
Commit
·
8a1bb27
1
Parent(s):
5497c27
ggml : ggml_type_name return "NONE" for invalid values (llama/9458)
Browse filesWhen running on Windows, the quantization utility attempts to print the types that are not set which leads to a crash.
- ggml/src/ggml.c +1 -1
ggml/src/ggml.c
CHANGED
|
@@ -3384,7 +3384,7 @@ double ggml_type_sizef(enum ggml_type type) {
|
|
| 3384 |
}
|
| 3385 |
|
| 3386 |
GGML_CALL const char * ggml_type_name(enum ggml_type type) {
|
| 3387 |
-
return type_traits[type].type_name;
|
| 3388 |
}
|
| 3389 |
|
| 3390 |
GGML_CALL bool ggml_is_quantized(enum ggml_type type) {
|
|
|
|
| 3384 |
}
|
| 3385 |
|
| 3386 |
GGML_CALL const char * ggml_type_name(enum ggml_type type) {
|
| 3387 |
+
return type < GGML_TYPE_COUNT ? type_traits[type].type_name : "NONE";
|
| 3388 |
}
|
| 3389 |
|
| 3390 |
GGML_CALL bool ggml_is_quantized(enum ggml_type type) {
|