Skip to content

Commit

Permalink
remove unneccesary else in MemoryManager
Browse files Browse the repository at this point in the history
  • Loading branch information
asyms committed Oct 1, 2024
1 parent 6a0e42f commit 3cc863a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions stream/cost_model/memory_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,9 @@ def find_best_tensor_combination_to_evict_fast(
instance_priority = tensor.get_instance_priority(top_instance, self)
importance = instance_priority * tensor.size
evictable_tensors_priority_size.append(importance)

else:
evictable_tensors_priority_size, evictable_tensors = zip(
*sorted(zip(evictable_tensors_priority_size, evictable_tensors))
)
evictable_tensors_priority_size, evictable_tensors = zip(
*sorted(zip(evictable_tensors_priority_size, evictable_tensors))
)
evictable_tensors_size = [tensor.size for tensor in evictable_tensors]
evictable_tensors_size_sums = [
sum(evictable_tensors_size[:i]) for i in range(0, len(evictable_tensors_size) + 1)
Expand Down

0 comments on commit 3cc863a

Please sign in to comment.