mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-09-10 02:33:49 +00:00
Fix alignment bug in llama.com
This commit is contained in:
parent
ca990ef091
commit
6cb9553706
2 changed files with 10 additions and 7 deletions
6
third_party/ggml/llama_util.h
vendored
6
third_party/ggml/llama_util.h
vendored
|
@ -377,13 +377,13 @@ struct llama_buffer {
|
|||
size_t size = 0;
|
||||
|
||||
void resize(size_t size) {
|
||||
delete[] addr;
|
||||
addr = new uint8_t[size];
|
||||
free(addr);
|
||||
addr = (uint8_t *)memalign(32, size);
|
||||
this->size = size;
|
||||
}
|
||||
|
||||
~llama_buffer() {
|
||||
delete[] addr;
|
||||
free(addr);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue