Skip to content

Commit

Permalink
add peak memory log for tvm as well
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Feb 20, 2024
1 parent cf0813d commit f716851
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serve/mlc_serve/model/tvm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ def profile_memory_usage(self, seq_lens):

vm_alloc_after = self.get_used_memory()

LOG.info(f"peak memory during profling: {(vm_alloc_after - vm_alloc_before) / 1e9} GB")

return self.get_param_nbytes() + (vm_alloc_after - vm_alloc_before)

def generate_multi_query(
Expand Down

0 comments on commit f716851

Please sign in to comment.