MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / select_buft

Function select_buft

subprojects/llama.cpp/src/llama-model.cpp:7417–7427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7415
7416template<typename F>
7417static ggml_backend_buffer_type_t select_buft(const buft_list_t & buft_list, const F & fn) {
7418 for (const auto & cur : buft_list) {
7419 ggml_backend_dev_t cur_dev = cur.first;
7420 ggml_backend_buffer_type_t cur_buft = cur.second;
7421 if (buft_supported(cur_buft, cur_dev, fn)) {
7422 return cur_buft;
7423 }
7424 }
7425
7426 throw std::runtime_error(format("no suitable buffer type found"));
7427}
7428
7429ggml_backend_buffer_type_t llama_model::select_buft(int il) const {
7430 return ::select_buft(

Callers 1

select_buftMethod · 0.85

Calls 2

buft_supportedFunction · 0.85
formatFunction · 0.85

Tested by

no test coverage detected