Skip to content

llama: add an api to get max devices at runtime. #2253

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 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,10 @@ struct llama_model_quantize_params llama_model_quantize_default_params() {
return result;
}

int llama_max_devices() {
return LLAMA_MAX_DEVICES;
}

bool llama_mmap_supported() {
return llama_mmap::SUPPORTED;
}
Expand Down
2 changes: 2 additions & 0 deletions llama.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ extern "C" {
int32_t n_eval;
};

LLAMA_API int llama_max_devices();

LLAMA_API struct llama_context_params llama_context_default_params();
LLAMA_API struct llama_model_quantize_params llama_model_quantize_default_params();

Expand Down