Skip to content

Commit 2232b0e

Browse files
committed
Schlep in Chromium Zlib
Now that ggml-rocm.dll is 200mb we need a faster DEFLATE algorithm so it gets self-extracted faster. This is provided by Cosmpo Libc which favors using Mark Adler's Puff library by default which saves 40kb of code size
1 parent 698de91 commit 2232b0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llamafile/cuda.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ __static_yoink("llama.cpp/ggml-common.h");
5151
__static_yoink("llama.cpp/ggml-backend.h");
5252
__static_yoink("llama.cpp/ggml-backend-impl.h");
5353

54+
// yoink the fastest zlib deflate impl from cosmo libc
55+
__static_yoink("_Cz_inflateInit2");
56+
__static_yoink("_Cz_inflate");
57+
__static_yoink("_Cz_inflateEnd");
58+
5459
#define THESTRING(x) #x
5560
#define STRINGIFY(x) THESTRING(x)
5661
#define ARMS_ONLY(x) (!IsAarch64() ? "-DIGNORE" STRINGIFY(__COUNTER__) : x)

0 commit comments

Comments
 (0)