MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / select_buft

Function select_buft

smallthinker/src/llama-model.cpp:4720–4730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4718
4719template<typename F>
4720static ggml_backend_buffer_type_t select_buft(const buft_list_t & buft_list, const F & fn) {
4721 for (const auto & cur : buft_list) {
4722 ggml_backend_dev_t cur_dev = cur.first;
4723 ggml_backend_buffer_type_t cur_buft = cur.second;
4724 if (buft_supported(cur_buft, cur_dev, fn)) {
4725 return cur_buft;
4726 }
4727 }
4728
4729 throw std::runtime_error(format("no suitable buffer type found"));
4730}
4731
4732ggml_backend_buffer_type_t llama_model::select_buft(int il) const {
4733 return ::select_buft(

Callers 1

select_buftMethod · 0.85

Calls 2

buft_supportedFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected