remove redundant mamba_cache clearing actions (#16180)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user