Skip to content

Commit

Permalink
deprecate peak memory
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Oct 31, 2023
1 parent 96ae22a commit 620ae7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions optimum_benchmark/benchmarks/inference/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ def get_results_df(self) -> DataFrame:
results_dict["diffusion.throughput(images/s)"] = self.diffusion_throughput

if self.config.memory:
LOGGER.warning(
"forward.peak_memory(MB) is deprecated and will be removed in a future release"
" please use forward.max_memory_used(MB) instead"
)
results_dict["forward.peak_memory(MB)"] = self.forward_max_memory_used
results_dict["forward.max_memory_used(MB)"] = self.forward_max_memory_used
results_dict["forward.max_memory_allocated(MB)"] = self.forward_max_memory_allocated
results_dict["forward.max_memory_reserved(MB)"] = self.forward_max_memory_reserved
Expand All @@ -265,6 +270,11 @@ def get_results_df(self) -> DataFrame:
results_dict["generate.throughput(tokens/s)"] = self.generate_throughput

if self.config.memory:
LOGGER.warning(
"generate.peak_memory(MB) is deprecated and will be removed in a future release"
" please use generate.max_memory_used(MB) instead"
)
results_dict["generate.peak_memory(MB)"] = self.generate_max_memory_used
results_dict["generate.max_memory_used(MB)"] = self.generate_max_memory_used
results_dict["generate.max_memory_allocated(MB)"] = self.generate_max_memory_allocated
results_dict["generate.max_memory_reserved(MB)"] = self.generate_max_memory_reserved
Expand Down

0 comments on commit 620ae7f

Please sign in to comment.