fix logic

This commit is contained in:
OlivierDehaene 2024-06-18 13:56:16 +02:00
parent fe6a2756f1
commit b21ed583ac
2 changed files with 5 additions and 10 deletions

View File

@ -20,10 +20,6 @@ tokenizers = { version = "0.19.1", features = ["http"] }
hf-hub = { version = "0.3.1", features = ["tokio"] } hf-hub = { version = "0.3.1", features = ["tokio"] }
[profile.release] [profile.release]
incremental = true
[profile.release-binary]
inherits = "release"
debug = 1 debug = 1
incremental = true incremental = true
panic = "abort" panic = "abort"

View File

@ -407,14 +407,13 @@ async fn filter_batch(
.block_allocation .block_allocation
.as_ref() .as_ref()
.map(|alloc| { .map(|alloc| {
let max_blocks = match max_blocks {
Some(max_blocks) => max_blocks,
_ => unreachable!(),
};
let blocks = alloc.blocks().to_vec(); let blocks = alloc.blocks().to_vec();
let mut padded_blocks = blocks.clone(); let mut padded_blocks = blocks.clone();
padded_blocks.resize(max_blocks - padded_blocks.len(), 0);
if let Some(max_blocks) = max_blocks {
padded_blocks.resize(max_blocks, 0);
}
(blocks, padded_blocks) (blocks, padded_blocks)
}) })
.unwrap_or_default(); .unwrap_or_default();