Skip to content

Commit cb443e7

Browse files
committed
Remove useless struct that was accidentally added.
(Leftover from development. Originally, instead of `struct llama_buffer`, I tried to use `std::vector<UninitU8>`. This has the right behavior when compiled normally with full optimizations, but when building unoptimized, it does a very slow loop where it calls a constructor for every byte. Okay, but does performance of unoptimized builds really matter? ...Don't know, but in my testing, the same thing happened when building with optimizations on but with ASan/UBSan enabled, which is a very useful mode to compile in. So I figured it was better to spend a few extra lines of code on `llama_buffer`.)
1 parent e3c91b5 commit cb443e7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

llama.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ struct llama_layer {
102102
struct ggml_tensor * w3;
103103
};
104104

105-
struct UninitU8 {
106-
uint8_t c;
107-
};
108-
109105
struct llama_kv_cache {
110106
struct ggml_tensor * k;
111107
struct ggml_tensor * v;

0 commit comments

Comments
 (0)