Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tensorrt_llm/_torch/pyexecutor/model_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ def clean_up_kv_cache():
# Zero the KV cache; NaNs may be introduced during warmup
for layer_idx in kv_cache_manager.layer_offsets.keys():
kv_cache_manager.get_buffers(layer_idx).zero_()
torch.cuda.synchronize()

stack.callback(clean_up_kv_cache)

Expand Down