Skip to content

Commit a410d23

Browse files
committed
gguf-hash: remove clib sha256 attempt
1 parent f01de1a commit a410d23

File tree

8 files changed

+11
-331
lines changed

8 files changed

+11
-331
lines changed

examples/gguf-hash/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ install(TARGETS ${TARGET} RUNTIME)
55
# clibs dependencies
66
include_directories(deps/)
77
add_library(xxhash OBJECT deps/xxhash/xxhash.c deps/xxhash/xxhash.h)
8+
target_link_libraries(${TARGET} PRIVATE xxhash)
89
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)
1111

1212
target_link_libraries(${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
1313
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/gguf-hash/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,21 @@ CLI to hash GGUF files.
66

77
- `--xxhash`: use xhash (default)
88
- `--sha1`: use sha1
9-
- `--sha256`: use sha256
109

1110
### Compile Example
1211

1312
```
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
1616
./build/bin/llama-gguf-hash test.gguf
1717
./build/bin/llama-gguf-hash --xxhash test.gguf
1818
./build/bin/llama-gguf-hash --sha1 test.gguf
19-
./build/bin/llama-gguf-hash --sha256 test.gguf
2019
```
2120

22-
### Crypto/Hash Libaries Used
21+
### Crypto/Hash Libraries Used
2322

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)
2524

26-
- https://github.com/clibs/sha1/
27-
- https://github.com/Cyan4973/xxHash
2825
- https://github.com/mofosyne/xxHash
26+
- https://github.com/clibs/sha1/

examples/gguf-hash/deps/rotate-bits/package.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/gguf-hash/deps/rotate-bits/rotate-bits.h

Lines changed: 0 additions & 46 deletions
This file was deleted.

examples/gguf-hash/deps/sha256/package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/gguf-hash/deps/sha256/sha256.c

Lines changed: 0 additions & 221 deletions
This file was deleted.

examples/gguf-hash/deps/sha256/sha256.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/gguf-hash/gguf-hash.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
#include "xxhash/xxhash.h"
1313
#include "sha1/sha1.h"
14-
#include "sha256/sha256.h"
1514

16-
//#define SHA256
15+
#ifdef SHA256 // TODO: https://github.com/jb55/sha256.c
16+
#include "sha256/sha256.h"
17+
#endif
1718

1819
struct hash_params {
1920
std::string input;

0 commit comments

Comments
 (0)