[Perf] Optimize clamp to clamp_ (#48143)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Wentao Ye
2026-07-16 18:41:07 -04:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 2cab53ddee
commit f17be06fbe
7 changed files with 48 additions and 32 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ class DeepseekV4FlashMLAMetadataBuilder(
cm.num_actual_tokens,
cm.query_start_loc,
cm.seq_lens,
cm.block_table_tensor.clamp(min=0),
cm.block_table_tensor.clamp_(min=0),
int(self.kv_cache_spec.storage_block_size),
self.compress_ratio,
out=self.compressed_slot_mapping_buffer,