ggml : minor

This commit is contained in:
Georgi Gerganov 2023-09-27 18:47:54 +03:00 committed by GitHub
parent e0eba91bea
commit b6434356ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View file

@ -122,7 +122,7 @@ static NSString * const msl_library_source = @"see metal.metal";
@end
ggml_log_callback ggml_metal_log_callback = NULL;
void *ggml_metal_log_user_data = NULL;
void * ggml_metal_log_user_data = NULL;
void ggml_metal_log_set_callback(ggml_log_callback log_callback, void * user_data) {
ggml_metal_log_callback = log_callback;
@ -130,7 +130,7 @@ void ggml_metal_log_set_callback(ggml_log_callback log_callback, void * user_dat
}
static void ggml_metal_log(enum ggml_log_level level, const char* format, ...){
if ( ggml_metal_log_callback != NULL ) {
if (ggml_metal_log_callback != NULL) {
va_list args;
va_start(args, format);
char buffer[128];
@ -518,7 +518,7 @@ bool ggml_metal_add_buffer(
ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0);
if (ctx->device.currentAllocatedSize > ctx->device.recommendedMaxWorkingSetSize) {
GGML_METAL_LOG_WARN("%s: warning: current allocated size is greater than the recommended max working set size\n", __func__);
GGML_METAL_LOG_WARN(", warning: current allocated size is greater than the recommended max working set size\n", __func__);
} else {
GGML_METAL_LOG_INFO("\n");
}
@ -1039,7 +1039,7 @@ void ggml_metal_graph_compute(
} break;
default:
{
GGML_METAL_LOG_ERROR("Asserting on type %d\n",(int)src0t);
GGML_METAL_LOG_ERROR("Asserting on type %d\n", (int)src0t);
GGML_ASSERT(false && "not implemented");
}
};

5
ggml.h
View file

@ -1688,11 +1688,6 @@ extern "C" {
};
typedef void (*ggml_opt_callback)(void * data, float * sched);
// Signature for logging events
// Note that text includes the new line character at the end for most events.
// If your logging mechanism cannot handle that, check if the last character is '\n' and strip it
// if it exists.
// It might not exist for progress report where '.' is output repeatedly.
typedef void (*ggml_log_callback)(enum ggml_log_level level, const char * text, void * user_data);
// optimization parameters