File tree Expand file tree Collapse file tree 8 files changed +11
-331
lines changed Expand file tree Collapse file tree 8 files changed +11
-331
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ install(TARGETS ${TARGET} RUNTIME)
5
5
# clibs dependencies
6
6
include_directories (deps/ )
7
7
add_library (xxhash OBJECT deps/xxhash/xxhash.c deps/xxhash/xxhash.h )
8
+ target_link_libraries (${TARGET} PRIVATE xxhash )
8
9
add_library (sha1 OBJECT deps/sha1/sha1.c deps/sha1/sha1.h )
9
- add_library (sha256 OBJECT deps/sha256/sha256.c deps/sha256/sha256.h )
10
- target_link_libraries (${TARGET} PRIVATE sha1 sha256 xxhash )
10
+ target_link_libraries (${TARGET} PRIVATE sha1 )
11
11
12
12
target_link_libraries (${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT} )
13
13
target_compile_features (${TARGET} PRIVATE cxx_std_11 )
Original file line number Diff line number Diff line change @@ -6,23 +6,21 @@ CLI to hash GGUF files.
6
6
7
7
- ` --xxhash ` : use xhash (default)
8
8
- ` --sha1 ` : use sha1
9
- - ` --sha256 ` : use sha256
10
9
11
10
### Compile Example
12
11
13
12
```
14
- cmake -B build
15
- make -C build llama-gguf-hash
13
+ cmake -B build -DCMAKE_BUILD_TYPE=Debug -DLLAMA_FATAL_WARNINGS=ON
14
+ make -C build clean
15
+ make -C build llama-gguf-hash VERBOSE=1
16
16
./build/bin/llama-gguf-hash test.gguf
17
17
./build/bin/llama-gguf-hash --xxhash test.gguf
18
18
./build/bin/llama-gguf-hash --sha1 test.gguf
19
- ./build/bin/llama-gguf-hash --sha256 test.gguf
20
19
```
21
20
22
- ### Crypto/Hash Libaries Used
21
+ ### Crypto/Hash Libraries Used
23
22
24
- These small clibs was installed via the [ clib c package manager] ( https://github.com/clibs )
23
+ These micro c libraries dependencies was installed via the [ clib c package manager] ( https://github.com/clibs )
25
24
26
- - https://github.com/clibs/sha1/
27
- - https://github.com/Cyan4973/xxHash
28
25
- https://github.com/mofosyne/xxHash
26
+ - https://github.com/clibs/sha1/
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11
11
12
12
#include " xxhash/xxhash.h"
13
13
#include " sha1/sha1.h"
14
- #include " sha256/sha256.h"
15
14
16
- // #define SHA256
15
+ #ifdef SHA256 // TODO: https://github.com/jb55/sha256.c
16
+ #include " sha256/sha256.h"
17
+ #endif
17
18
18
19
struct hash_params {
19
20
std::string input;
You can’t perform that action at this time.
0 commit comments