mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
fossilize ggml library ver 3, to support ggjtv3
This commit is contained in:
parent
1804238e3f
commit
db14de5c32
18 changed files with 44315 additions and 1591 deletions
|
@ -9,7 +9,6 @@
|
|||
#include <sstream>
|
||||
|
||||
|
||||
|
||||
void utreplace(std::string & str, const std::string & needle, const std::string & replacement) {
|
||||
size_t pos = 0;
|
||||
while ((pos = str.find(needle, pos)) != std::string::npos) {
|
||||
|
@ -224,13 +223,13 @@ bool should_transpose_layer(std::string name)
|
|||
}
|
||||
|
||||
static std::vector<uint8_t> kcpp_compute_buf;
|
||||
void kcpp_graph_compute_helper(ggml_cgraph *graph, int n_threads)
|
||||
void kcpp_graph_compute_helper(struct ggml_v3_cgraph *graph, int n_threads)
|
||||
{
|
||||
struct ggml_cplan plan = ggml_graph_plan(graph, n_threads);
|
||||
struct ggml_v3_cplan plan = ggml_v3_graph_plan(graph, n_threads);
|
||||
if (plan.work_size > 0)
|
||||
{
|
||||
kcpp_compute_buf.resize(plan.work_size);
|
||||
plan.work_data = kcpp_compute_buf.data();
|
||||
}
|
||||
ggml_graph_compute(graph, &plan);
|
||||
}
|
||||
ggml_v3_graph_compute(graph, &plan);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue