mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	@@ -363,8 +363,10 @@ llama_pos llama_memory_recurrent::seq_pos_max(llama_seq_id seq_id) const {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
llama_memory_context_ptr llama_memory_recurrent::init_batch(llama_batch_allocr & balloc, uint32_t n_ubatch, bool embd_all) {
 | 
					llama_memory_context_ptr llama_memory_recurrent::init_batch(llama_batch_allocr & balloc, uint32_t n_ubatch, bool embd_all) {
 | 
				
			||||||
    std::vector<llama_ubatch> ubatches;
 | 
					    do {
 | 
				
			||||||
 | 
					        balloc.split_reset();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        std::vector<llama_ubatch> ubatches;
 | 
				
			||||||
        while (true) {
 | 
					        while (true) {
 | 
				
			||||||
            llama_ubatch ubatch;
 | 
					            llama_ubatch ubatch;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -383,10 +385,13 @@ llama_memory_context_ptr llama_memory_recurrent::init_batch(llama_batch_allocr &
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!prepare(ubatches)) {
 | 
					        if (!prepare(ubatches)) {
 | 
				
			||||||
        return std::make_unique<llama_memory_recurrent_context>(LLAMA_MEMORY_STATUS_FAILED_PREPARE);
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return std::make_unique<llama_memory_recurrent_context>(this, std::move(ubatches));
 | 
					        return std::make_unique<llama_memory_recurrent_context>(this, std::move(ubatches));
 | 
				
			||||||
 | 
					    } while (false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return std::make_unique<llama_memory_recurrent_context>(LLAMA_MEMORY_STATUS_FAILED_PREPARE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
llama_memory_context_ptr llama_memory_recurrent::init_full() {
 | 
					llama_memory_context_ptr llama_memory_recurrent::init_full() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user