mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-27 16:37:29 -05:00
sync : ggml (#29396)
* ggml : bump version to 0.25.2 (ggml/1642) * ggml : fix ubsan error in `ggml_graph_nbytes` (ggml/1644) * ggml : bump version to 0.25.3 (ggml/1645) * sync : ggml
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ project("ggml" C CXX ASM)
|
||||
### GGML Version
|
||||
set(GGML_VERSION_MAJOR 0)
|
||||
set(GGML_VERSION_MINOR 25)
|
||||
set(GGML_VERSION_PATCH 1)
|
||||
set(GGML_VERSION_PATCH 3)
|
||||
set(GGML_VERSION_BASE "${GGML_VERSION_MAJOR}.${GGML_VERSION_MINOR}.${GGML_VERSION_PATCH}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
||||
|
||||
+2
-2
@@ -7450,7 +7450,7 @@ static void * incr_ptr_aligned(void ** p, size_t size, size_t align) {
|
||||
|
||||
static size_t ggml_graph_nbytes(size_t size, bool grads) {
|
||||
size_t hash_size = ggml_hash_size(size * 2);
|
||||
void * p = 0;
|
||||
void * p = (char *) 1024; // workaround for ubsan error "applying non-zero offset X to null pointer"
|
||||
incr_ptr_aligned(&p, sizeof(struct ggml_cgraph), 1);
|
||||
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // nodes
|
||||
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // leafs
|
||||
@@ -7463,7 +7463,7 @@ static size_t ggml_graph_nbytes(size_t size, bool grads) {
|
||||
incr_ptr_aligned(&p, ggml_bitset_size(hash_size) * sizeof(ggml_bitset_t), sizeof(ggml_bitset_t));
|
||||
|
||||
size_t nbytes = (size_t) p;
|
||||
return nbytes;
|
||||
return nbytes - 1024;
|
||||
}
|
||||
|
||||
size_t ggml_graph_overhead_custom(size_t size, bool grads) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
e565a8f4ce2e462c4973a24c51098dd3c81c0256
|
||||
353b63b439f27ab2cc19dac97ab1681ba6d2d084
|
||||
|
||||
Reference in New Issue
Block a user