Skip to content

Commit f1acd11

Browse files
committed
update
1 parent 423d890 commit f1acd11

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/llama-graph.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ void llm_graph_input_rs::set_input(const llama_ubatch * ubatch) {
238238
const int64_t n_rs = mctx->get_n_rs();
239239

240240
if (s_copy) {
241+
// Check if buffer was allocated - skip if not
242+
if (s_copy->buffer == nullptr) {
243+
fprintf(stderr, "[DEBUG] RS s_copy buffer is NULL, skipping copy operations\n");
244+
return;
245+
}
241246
GGML_ASSERT(ggml_backend_buffer_is_host(s_copy->buffer));
242247
int32_t * data = (int32_t *) s_copy->data;
243248

@@ -392,8 +397,17 @@ void llm_graph_input_attn_cross::set_input(const llama_ubatch * ubatch) {
392397
}
393398

394399
void llm_graph_input_mem_hybrid::set_input(const llama_ubatch * ubatch) {
395-
inp_attn->set_input(ubatch);
396-
inp_rs->set_input(ubatch);
400+
fprintf(stderr, "[DEBUG] hybrid set_input: inp_attn=%p, inp_rs=%p\n", (void*)inp_attn.get(), (void*)inp_rs.get());
401+
if (inp_attn) {
402+
inp_attn->set_input(ubatch);
403+
} else {
404+
fprintf(stderr, "[ERROR] inp_attn is null!\n");
405+
}
406+
if (inp_rs) {
407+
inp_rs->set_input(ubatch);
408+
} else {
409+
fprintf(stderr, "[ERROR] inp_rs is null!\n");
410+
}
397411
}
398412

399413
//

0 commit comments

Comments
 (0)