fix logic
This commit is contained in:
parent
fe6a2756f1
commit
b21ed583ac
|
@ -20,10 +20,6 @@ tokenizers = { version = "0.19.1", features = ["http"] }
|
|||
hf-hub = { version = "0.3.1", features = ["tokio"] }
|
||||
|
||||
[profile.release]
|
||||
incremental = true
|
||||
|
||||
[profile.release-binary]
|
||||
inherits = "release"
|
||||
debug = 1
|
||||
incremental = true
|
||||
panic = "abort"
|
||||
|
|
|
@ -407,14 +407,13 @@ async fn filter_batch(
|
|||
.block_allocation
|
||||
.as_ref()
|
||||
.map(|alloc| {
|
||||
let max_blocks = match max_blocks {
|
||||
Some(max_blocks) => max_blocks,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
let blocks = alloc.blocks().to_vec();
|
||||
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)
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
|
Loading…
Reference in New Issue