feat(backend): fix when num_cores_per_instance is equals to zero with the size of the generated core allocation
This commit is contained in:
parent
8e89793514
commit
298367cdfd
|
@ -176,7 +176,7 @@ impl LlamaCppBackend {
|
||||||
// Allocate all the workers
|
// Allocate all the workers
|
||||||
let cores_allocation = get_cores_allocation(num_cores_per_instance as usize);
|
let cores_allocation = get_cores_allocation(num_cores_per_instance as usize);
|
||||||
cores_allocation.iter().for_each(|affinity| {
|
cores_allocation.iter().for_each(|affinity| {
|
||||||
match Self::allocate_worker(path, num_cores_per_instance as u32) {
|
match Self::allocate_worker(path, affinity.len() as u32) {
|
||||||
Ok(worker) => {
|
Ok(worker) => {
|
||||||
let tokenizer = Arc::clone(&tokenizer);
|
let tokenizer = Arc::clone(&tokenizer);
|
||||||
let affinity = affinity.clone().collect::<Vec<_>>();
|
let affinity = affinity.clone().collect::<Vec<_>>();
|
||||||
|
|
Loading…
Reference in New Issue