8000 Leverage mmap to offloading the tensors by howard0su · Pull Request #1597 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

Leverage mmap to offloading the tensors #1597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add assert to make sure we only allocate temp buffer for non-CPU back…
…end tensor

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
  • Loading branch information
howard0su and JohannesGaessler authored Jun 12, 2023
commit 61726bd9421e2b9c2720cd1349d2d4119b151eaa
1 change: 1 addition & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ struct llama_model_loader {

// allocate temp buffer if not using mmap
if (!use_mmap && lt.data == NULL) {
GGML_ASSERT(lt.ggml_tensor->backend != GGML_BACKEND_CPU);
lt.data = (uint8_t*)malloc(ggml_nbytes(lt.ggml_tensor));
}

Expand Down
0