Skip to content

Commit 29f8f67

Browse files
committed
fix: force matched nodes+leafs to GPU (revert to targeted forcing); cudaMemcpyDefault in copy_data_to_static; debug fprintfs around capture
1 parent 03abb40 commit 29f8f67

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/llama-context.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,11 @@ llm_graph_result * llama_context::process_ubatch(const llama_ubatch & ubatch, ll
20862086
auto [tid, il] = h2_hijack.match_name(t->name);
20872087
if (tid >= 0) ggml_backend_sched_set_tensor_backend(sched.get(), t, gpu);
20882088
}
2089+
for (int i = 0; i < ggml_graph_n_leafs(phase2_gf); i++) {
2090+
ggml_tensor * t = ggml_graph_leaf(phase2_gf, i);
2091+
auto [tid, il] = h2_hijack.match_name(t->name);
2092+
if (tid >= 0) ggml_backend_sched_set_tensor_backend(sched.get(), t, gpu);
2093+
}
20892094
force_idxs_to_cpu();
20902095
if (!ggml_backend_sched_alloc_graph(sched.get(), phase2_gf)) {
20912096
ret = GGML_STATUS_ALLOC_FAILED; return nullptr;

0 commit comments

Comments
 (0)