remove redundant mamba_cache clearing actions (#16180)

This commit is contained in:
yudian0504
2026-01-05 13:02:07 +08:00
committed by GitHub
parent f84487af59
commit 561a3e04f6

View File

@@ -271,12 +271,7 @@ class MambaPool:
select_index = self.free_slots[:need_size]
self.free_slots = self.free_slots[need_size:]
# clear at alloc time
for i in range(len(self.mamba_cache.conv)):
self.mamba_cache.conv[i][:, select_index] = 0
self.mamba_cache.temporal[:, select_index] = 0
# fill allocated slots with zeros
# clear at alloc time, fill allocated slots with zeros
for i in range(len(self.mamba_cache.conv)):
self.mamba_cache.conv[i][:, select_index] = 0
self.mamba_cache.temporal[:, select_index] = 0