[Kimi Bug] Fix k3 torch.AcceleratorError: CUDA error: an illegal memory access was encountered (#53773)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -845,6 +845,8 @@ def _teardown_profiling_state(runner: "GPUModelRunner") -> None:
|
||||
"""Release the profiling KV cache and captured graphs while keeping model
|
||||
weights, so the real ``initialize_kv_cache`` starts from a clean slate."""
|
||||
torch.accelerator.synchronize()
|
||||
if hasattr(runner.model_state, "_mamba_ctx"):
|
||||
runner.model_state._mamba_ctx = None
|
||||
if hasattr(runner, "kv_caches"):
|
||||
runner.kv_caches.clear()
|
||||
if hasattr(runner, "attn_groups"):
|
||||
|
||||
Reference in New Issue
Block a user